Ale*_*fer 6 python directory install bin
我已经研究了几个小时无济于事.
当我安装python 3时,我想在/ usr/bin/python中删除了我的目录,因为我收到此错误: -bash: /usr/bin/python: No such file or directory.
我试过了sudo ln -s /usr/bin/python2.7 /usr/bin/python,这给了我ln: /usr/bin/python: File exists
但是,它仍然不会在/ usr/bin/python中永久安装目录.如何永久还原此目录?
我在Mac上.
谢谢!
sis*_*aty 13
您的文件/ usr/bin/python存在,因为您收到消息:
ln: /usr/bin/python: File exists
Run Code Online (Sandbox Code Playgroud)
但我发现这是一个不存在的东西的损坏链接,因为你收到了消息:
-bash: /usr/bin/python: No such file or directory
Run Code Online (Sandbox Code Playgroud)
你需要做的是解决这个问题:
sudo rm /usr/bin/python # because that's a corrupted file
sudo ln -s /usr/bin/python2.7 /usr/bin/python # this line will work if your file /usr/bin/python2.7 is OK.
Run Code Online (Sandbox Code Playgroud)
希望有所帮助!