当我尝试在终端中运行python时出现此错误
-bash: /Users/steve/Library/Enthought/Canopy_64bit/User/bin/python: No such file or directory
我原本安装了Anaconda,然后不小心安装了Canopy。这引起了一个问题,每当我试图安装一个包(如beautifulsoup)时,它说它已经安装,说'要求满意'(aaconda的b / c)。当我试图在python上运行它时会说它没有安装(天篷的b / c)。所以我按照说明卸载了顶篷,上面的消息仍然出现。不知道为什么。
非常感谢任何帮助。
答案 0 :(得分:0)
您的python命令正在使用指向不存在的文件/Users/rkauf/Library/Enthought/Canopy_64bit/User/bin/python
的链接。
您想要将链接更改为指向有效的python安装。如果它位于/usr/bin/python
(请与which python
核对),则命令如下:
sudo rm /usr/bin/python # remove the old link. the -f option for ln also works
sudo ln -s /usr/bin/python2.7 /usr/bin/python # create a new link
OBS :请务必谨慎使用sudo
。第一个命令删除文件,但无法撤消。