Spyder: Mac OS spyder won't launch: python.app directory mismatch

Created on 2 Aug 2019  路  17Comments  路  Source: spyder-ide/spyder

Problem Description

Spyder won't launch. .../python.app/.../python directory does not match that in ../anaconda3/bin/pythonw

What steps reproduce the problem?

  1. Spyder (3.3.6) installed through anaconda navigator
  2. Launching spyder through navigator gives no response
  3. Typing spyder in terminal returned error

Paste Traceback/Error Below (if applicable)

/Users/xyan/anaconda3/bin/pythonw: line 3: /Users/xyan/anaconda3/python.app/Contents/MacOS/python: No such file or directory

Versions

  • Spyder version: 3.3.6
  • Python version: 3.7.3
  • Qt version: 5.9.7
  • PyQt version: 5.9.2
  • Operating System name/version: Mac Mojave 10.14.6
Awaiting Followup

Most helpful comment

Please run

conda install -f python.app

to see if that helps.

All 17 comments

Attempted Solutiom

I opened /Users/xyan/anaconda3/bin/pythonw, which is simply:

#!/bin/bash
export PYTHONEXECUTABLE=/Users/xyan/anaconda3/bin/python
/Users/xyan/anaconda3/python.app/Contents/MacOS/python "$@"

while I found the python binary is actually in

/Users/xyan/anaconda3/python.app/pythonapp/Contents/MacOS/python

I changed the directory manually and spyder can launch without problem.

Since everything involved here is from the native anaconda, I suspect other people might have the same issue.

Please run

conda install -f python.app

to see if that helps.

Closing due to lack of response.

Had the same issue. @ccordoba12 your solution worked for me. Thanks

conda install -f python.app

This worked for me which had the same issue as OP!

@ccordoba12 your solution worked for me as well

Yeah, it works for me as well. Thanks!

@ccordoba12 your answer worked for me! I started having errors after updating conda. Lucky things are back to normal after running your command.

Please run

conda install -f python.app

to see if that helps.

Carlos, this is an old issue, but your solution worked for me as well. Also, is that you at 77 Mass Ave?

Carlos, this is an old issue, but your solution worked for me as well.

Glad to know that old advice it's still helpful!

Also, is that you at 77 Mass Ave?

Sorry to disappoint you but I don't live in USA. But just out of curiosity, who are you talking about?

Where you鈥檙e standing looks like the main entrance to MIT.

Lol, I understand your comment now! Actually, I've never been to MIT.

I took that photo in front of "El Prado" museum in Madrid, a long long time ago.

Cool.

didn't work for me
conda update --all also didn't

Traceback (most recent call last):
File "/Users/amin/anaconda3/bin/spyder", line 7, in
from spyder.app.start import main
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/app/start.py", line 35, in
from spyder.config.main import CONF
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/config/main.py", line 21, in
from spyder.config.fonts import BIG, MEDIUM, MONOSPACE, SANS_SERIF
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/config/fonts.py", line 14, in
from spyder.config.utils import is_ubuntu
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/config/utils.py", line 15, in
from spyder_kernels.utils import iofuncs
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder_kernels/utils/iofuncs.py", line 521, in
iofunctions.setup()
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder_kernels/utils/iofuncs.py", line 445, in setup
iofuncs = self.get_internal_funcs()+self.get_3rd_party_funcs()
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder_kernels/utils/iofuncs.py", line 496, in get_3rd_party_funcs
for mod in get_spyderplugins_mods(io=True):
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/otherplugins.py", line 42, in get_spyderplugins_mods
_get_spyderplugins(plugin_path, io, modnames, modlist)
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/otherplugins.py", line 51, in _get_spyderplugins
for name in os.listdir(plugin_path):
PermissionError: [Errno 13] Permission denied: '/Users/amin/.local/lib/python3.7/site-packages'

conda install -f python.app did it for me today. Great tip!

conda update -n env --all is broken. Second time the update breaks python.

Yeah, conda update --all is usually not your best friend.

Yeah, conda update --all is usually not your best friend.

didn't work either and showed this error again:

Traceback (most recent call last):
File "/Users/amin/anaconda3/bin/spyder", line 7, in
from spyder.app.start import main
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/app/start.py", line 35, in
from spyder.config.manager import CONF
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/config/manager.py", line 17, in
from spyder.config.main import CONF_VERSION, DEFAULTS, NAME_MAP
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/config/main.py", line 19, in
from spyder.config.fonts import MEDIUM, SANS_SERIF
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/config/fonts.py", line 14, in
from spyder.config.utils import is_ubuntu
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/config/utils.py", line 17, in
from spyder_kernels.utils import iofuncs
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder_kernels/utils/iofuncs.py", line 523, in
iofunctions.setup()
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder_kernels/utils/iofuncs.py", line 447, in setup
iofuncs = self.get_internal_funcs()+self.get_3rd_party_funcs()
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder_kernels/utils/iofuncs.py", line 498, in get_3rd_party_funcs
for mod in get_spyderplugins_mods(io=True):
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/otherplugins.py", line 45, in get_spyderplugins_mods
_get_spyderplugins(plugin_path, io, modnames, modlist)
File "/Users/amin/anaconda3/lib/python3.7/site-packages/spyder/otherplugins.py", line 54, in _get_spyderplugins
for name in os.listdir(plugin_path):
PermissionError: [Errno 13] Permission denied: '/Users/amin/.local/lib/python3.7/site-packages'

Was this page helpful?
0 / 5 - 0 ratings

Related issues

andreperesnl picture andreperesnl  路  128Comments

jdweaver picture jdweaver  路  77Comments

batuhandayioglugil picture batuhandayioglugil  路  72Comments

spyder-bot picture spyder-bot  路  55Comments

derDavidT picture derDavidT  路  62Comments