macos 无法通过spyder命令打开spyder编辑器

conda更新到最新后,我的macos无法通过anaconda客户端或者spyder命令打开spyder开发编辑器。

具体报错信息如下

(base) x86_64-apple-darwin13% spyder
/Users/pluto/anaconda3/bin/pythonw: line 3: /Users/pluto/anaconda3/python.app/Contents/MacOS/python: No such file or directory

参考其它blog解决方案,以为得到救命稻草

conda install -f python.app

但结果无效

=======================================苦苦======寻找=====================================

最终解决问题方法,参考Mac OS spyder won't launch: python.app directory mismatch(https://github.com/spyder-ide/spyder/issues/9951)

vi /Users/pluto/anaconda3/bin/pythonw # 发现目录指向地址有问题

变动前,原始内容

#!/bin/bash

export PYTHONEXECUTABLE=/Users/pluto/anaconda3/bin/python

/Users/pluto/anaconda3/python.app/Contents/MacOS/python "$@"

修改后内容

#!/bin/bash

export PYTHONEXECUTABLE=/Users/pluto/anaconda3/bin/python

/Users/pluto/anaconda3/python.app/pythonapp/Contents/MacOS/python "$@"

注意目录层级在python.app后多了pythonapp一级

 

ps:纸上得来终觉浅,深知此事要躬行

你可能感兴趣的:(python,spyder,深度学习,python,anaconda)