Jespar
Jespar

Reputation: 1026

Spyder pip install not found: OSX

So I have installed spyder through the pip install spyder command on my terminal. When I type pip show spyder I receive:

Name: spyder
Version: 3.1.3
Summary: Scientific PYthon Development EnviRonment
Home-page: https://github.com/spyder-ide/spyder
Author: The Spyder Project Contributors
Author-email: UNKNOWN
License: MIT
Location: /Users/g******/anaconda/lib/python3.5/site-packages
Requires: pyzmq, chardet, nbconvert, numpydoc, qtconsole, qtpy, jedi, pickleshare, pep8, pyflakes, pygments, rope-py3k, sphinx, qtawesome, psutil, pylint

Also, when I launch anaconda platform and go to the environments>root I see that spyder is there. But, in the Home section it shows that is not installed. Furthermore, on terminal, when I type python it runs smoothly, when I do the same for jupyter notebook again it runs smoothly. But, when I type spyder I get:

G****-MacBook-Pro:~ g*****$ spyder
-bash: /Users/g*****/anaconda/bin/spyder: No such file or directory

I think it has to do with the directory the programmes are installed. Nevertheless, it seems weird to a newbie like myself. Any suggestions how to launch spyder?

UPDATE: Ok so when I execute which python on terminal, I get the location:

/Users/g*****/anaconda/bin/python

Now, I am 100% sure that it has to do with the locality of the programme. Eventhough, still seems weird to me that I can see the package on the root environment of Anaconda but I am not able to launch it.

Upvotes: 0

Views: 3083

Answers (1)

Nick T
Nick T

Reputation: 26717

It seems like bash can find the program in $PATH because it's adding the full path (/Users/.../bin/spyder), but you could verify this with which:

$ which spyder
/Users/.../bin/spyder

After that, there might be a problem with that executable, probably in the shebang, the first line that starts with #! that instructs bash on how to run the program.

$ head `which spyder`
#! (there should be a valid path to Python here...)
import blah
...

That path is probably broken, so you'll need to figure out why and fix your environment. If you moved the path it's referring to around or deleted it, that's why. Other than hand-fixing the path, you might be able to uninstall the package and reinstall it; Python will correctly set the shebang on installation.

Upvotes: 1

Related Questions