I cannot use Spyder 3.1.4 after upgrading from Ubuntu 17.04 to 17.10 because I cannot do basic configuration of Spyder itself.
I cannot configure (i.e. Menu Run | Configure or Ctrl-F6) I get the following error on the Internal Console
>>> Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/spyder/plugins/editor.py", line 2300, in edit_run_configurations
dialog.setup(fname)
File "/usr/lib/python2.7/dist-packages/spyder/plugins/runconfig.py", line 426, in setup
widget.set(options)
File "/usr/lib/python2.7/dist-packages/spyder/plugins/runconfig.py", line 260, in set
self.wd_cb.setChecked(self.runconf.wdir_enabled)
TypeError: setChecked(self, bool): argument 1 has unexpected type 'NoneType'
I have Spyder 3.1.4 running with Python 2.7.14 64bits, Qt 5.91, PyAt5 5.7 on Linux.
I suppose I can start uninstalling and reinstalling with pip, but I am hoping someone knows what the issue is and perhaps there is an easier solution.
Please run in a system terminal (i.e. cmd.exe or xterm) spyder --reset and try again. That should fix your problem.
Related
I am using FEniCS on mac trough Docker but I have a problem visualizing the result of an analysis using a Paraview version installed on mac. These are the steps I follow:
I obtain the solution of my problem using FEniCS; then send the .vtu file that FEniCS has generated from Docker to the desktop using
sudo docker cp fenics-container:/home/fenics/shared/nameoffile.vtu Users/User/Desktop
Subsequently, I open ParaView (which I directly installed on my mac and not on Docker) and open the file nameoffile.vtu. I press Apply and then an error appears:
ERROR: In /Users/kitware/dashboards/buildbot-slave/a64f5607/build/superbuild/paraview/src/VTK/IO/XML/vtkXMLUnstructuredDataReader.cxx, line 649
vtkXMLUnstructuredGridReader (0x7fc30ff7c440): Error reading cell offsets: Unsupported array type: vtkUnsignedIntArray
Can anyone explain what this error means?
when I tried open the file using Paraview on a Linux machine it worked just fine with no error. Am I missing some compatibility package?
Solved.
I installed a previous version of ParaView. Apparently latest ones are not fully compatible with all versions of FEniCS
I'm trying to install Opencv 3.2.0 and Nvidia CUDA toolkit 8.0 on Ubuntu 16.04 but I can't configure them together. I get the following error when I try to make project using both:
CMake Error at /usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:148 (message):
Could NOT find CUDA: Found unsuitable version "8.0", but required is exact
version "7.5" (found /usr/local/cuda)
Call Stack (most recent call first):
/usr/share/cmake-3.5/Modules/FindPackageHandleStandardArgs.cmake:386 (_FPHSA_FAILURE_MESSAGE)
/usr/share/cmake-3.5/Modules/FindCUDA.cmake:949 (find_package_handle_standard_args)
/usr/local/share/OpenCV/OpenCVConfig.cmake:86 (find_package)
/usr/local/share/OpenCV/OpenCVConfig.cmake:105 (find_host_package)
CMakeLists.txt:10 (find_package)
-- Configuring incomplete, errors occurred!
I have tried installing cuda toolkit 7.5 but its not compatible with ubuntu 16.04 I believe. I'm really clueless now, I hope someone can help with this.
Thanks
so I solved this issue by managing to install toolkit 7.5. Here is how I did it:
Updated nvidia driver for my Operating System
Download cuda toolkit 7.5 and extract it to a folder
$ mkdir ~/Downloads/NVIDIA_TOOLKIT
$ cd ~/Downloads
$ ./cuda_7.5.18_linux.run -extract=~/Downloads/NVIDIA_TOOLKIT;
go to the virtual console by pressing Ctrl + Alt + F1 and turn off
lightdm service
$ sudo service lightdm stop
cd to downloads and install the extracted toolkit and samples
$ cd ~/Downloads/NVIDIA_TOOLKIT
$ sudo ./cuda-linux64-rel-6.0.37-18176142.run
$ sudo ./cuda-samples-linux-6.0.37-18176142.run
Set environment variables in .bashrc file
$ PATH=/usr/local/cuda-7.5/bin
$ LD_LIBRARY_PATH=/usr/local/cuda-7.5/lib64
Turn back on the lightdm service
$ sudo service lightdm start
Reboot and you should be able to use the nvcc compiler
For openCV you will have to downgrade your gcc/ g++ compiler to 4.9 since it is not yet compatible with the higher versions
I'm working on Win64 with Anaconda 2.4.1. It was installed as described
here.
From the windows command line running ipython I can import cv2. Unfortunatelly, when I try cv2.imshow() the images are not shown but only a gray region of correct size. So I tried it from spyder.
From the spyder ipython console, I cannot import cv2:
Traceback (most recent call last):
File "<ipython-input-1-72fbbcfe2587>", line 1, in <module>
import cv2
The path variable is the same, as well as the working directory. How can I get more information, which DLL is not found.
Any hints? Thanks in advance.
EDIT: cv2.waitKey() helps in the Windows command line case, my bad. But why doesn't it work in spyder?
I am having trouble getting z3 to work with Python. I am running Windows 7 64bit. I have downloaded 64bit Python 3.3.0 and 64bit z3 4.3.0. I have updated my PATH and PYTHONPATH to include the z3 \bin directory. However, when I try to use z3 in python I get the following error:
from z3 import *
Traceback (most recent call last):
File "", line 1, in
ImportError: bad magic number in 'z3': b'\x03\xf3\r\n'
Does anyone know what is going wrong and how to fix it?
Thanks
Z3 v4.3.0 does not support Python 3.3. We have to use Python 2.7 (or 2.6). The next official version will support Python 3.x. In the meantime, you can use the unstable (working-in-progress) branch. For more information see the following related question:
Using Z3Py With Python 3.3
this is my first question to post.
I am working with python at the moment (on mac os 10.6.8), and have struggled for the lack of an ide. I have been using a version of emacs that offers syntax highlighting, but does not offer the ability to browse variable values without print statements. What I was looking for was the equivalent of eclipse, which basically died on my machine when I upgraded from 10.4.11 to 10.6.8. I've not been successful resurrecting it. Time to move on.
My graduate advisor suggested spyder, and last night I bit the bullet, installing macports and (apparently) spyder, successfully.
The problem I'm having is HOW do I start spyder once installed. Apparently, python spyder.py is not the approach to use. Elsewhere (not here) I saw a post that suggested that there was supposed to be a batch executable that I should be able to find by typing
which spyder
This yielded nothing.
The spyder documentation (located at http://packages.python.org/spyder/options.html) suggests that the command
python spyder.py
is the way to go. Here is the result:
Bobs-Machine:spyderlib robertlilly$ python spyder.py
Traceback (most recent call last):
File "spyder.py", line 31, in
from spyderlib import qt #analysis:ignore
ImportError: No module named spyderlib
Most of my searches here have just pointed out that one should use MacPorts for the install, nothing after that. The readme included the macports spyder install, I thought, didn't provide sufficient direction.
If anybody knows where to look, that would be great.
Regards,
Robert
For me, I installed the macports package py37-spyder. In /opt/local/bin there is the package there, spyder-3.7. Launching that works already. In order to make that the default, I have to run
sudo port select --set spyder spyder-37
Then I can run it directly as
spyder from Terminal. If you want to see which versions of spyder are available on your system, then
port select --list spyder
will tell you the versions you have.
Macports should install a spyder binary to /opt/local/bin/spyder, or thereabouts. If you already have /opt/local/bin/ in your PATH variable, then just run:
$ spyder &
Or more explicitly:
$ /opt/local/bin/spyder &
...if you don't have the PATH setup. Hope that helps.
I just recently installed spyder via MacPorts.
(the command I chose was sudo port install py27-spyder, which installed Spyder v.2.2.3 on Mac OS 10.7.5 & Python 2.7.5)
At the end of the Spyder installation, the terminal showed "use command spyder to launch" (or something to that effect)
So, for me, I simply had to type spyder into a terminal to launch it. Your error referring to missing spyderlib might mean that your spyder installation did not in fact complete properly. (I have found it's not uncommon to have to track down 2-3 weird bugs and dependencies for complex MacPorts installs).
If you find it did complete properly, then perhaps the MacPorts directory was not added to your PATH. It you open ~/.profile, you should seen that MacPorts added it's directory to the shell's search path. Here's what the MacPorts installer added to my .profile:
# MacPorts Installer addition on 2012-11-19_at_17:16:31: adding an appropriate PATH variable fo$
export PATH=/opt/local/bin:/opt/local/sbin:$PATH
# Finished adapting your PATH environment variable for use with MacPorts.
To make a Mac OS-friendly icon to launch Spyder, I then made a new text file (I did it with Terminal.app>pico) containing the following text:
#!/bin/bash
spyder
and saved the file as spyder.command. This file is now double-clickable and will launch Spyder (and an alias to it can have a more normal name like "Launch Spyder"). Throw it into the /Applications folder & make an Icon for it via /Utilities/Icon Composer.app (grab the Spyder icon on the website) and it's like a Pythonic Matlab!