I am trying to configure Python for my Emacs on Ubuntu, and I get the following error:
我正在尝试为我的Emacs在Ubuntu上配置Python,我得到了以下错误:
/usr/bin/env: python2: No such file or directory
Can someone help me with it? What can I do to resolve it?
谁能帮我一下吗?我能做些什么来解决它?
3 个解决方案
#1
7
Probably that's just true. The link /usr/bin/python2 -> (the real one)
should be provided by your Python package, but that's obviously not the case, nor on any other location where it can be found via the $PATH
.
也许这是真的。链接/usr/bin/python2 ->(真正的链接)应该由您的Python包提供,但显然不是这样,也不是在任何其他可以通过$PATH找到它的位置。
You should put the said link in your path at the (an) appropriate place.
你应该把上述链接放在你的路径在(an)适当的地方。
#2
10
Try this command in terminal
在终端上试试这个命令
sudo ln -s /usr/bin/python2.6 /usr/bin/python2
sudo ln -s /usr/ binon2.6 /usr/ binon2
or
或
sudo apt-get install python2
sudo apt-get安装python2
#3
1
On Ubuntu 12.04.
在Ubuntu 12.04。
To find out what package owns the file:
找出文件属于哪个包:
$ apt-file -F find /usr/bin/python2
python-minimal: /usr/bin/python2
To find out what packages depend on the package:
了解哪些包取决于包:
$ apt-cache rdepends python-minimal
python-minimal
Reverse Depends:
python2.7-minimal
|livecd-rootfs
python-minimal:i386
python-support
python2.7-minimal
python
|livecd-rootfs
It show that if you have python
package then you should have python-minimal
package then you should have /usr/bin/python2
file.
它显示如果您有python包,那么您应该拥有python-最小包,那么您应该拥有/usr/bin/python2文件。
Check whether /usr/bin
is in $PATH
inside emacs. If it is and you can't run /usr/bin/python2
from a shell then you could reinstall python-minimal
to restore /usr/bin/python2
file:
检查emacs中的/usr/bin是否在$PATH中。如果是的话,你不能从shell中运行/usr/bin/python2,那么你可以重新安装python-最小化来恢复/usr/bin/python2文件:
$ sudo apt-get --reinstall install python-minimal
#1
7
Probably that's just true. The link /usr/bin/python2 -> (the real one)
should be provided by your Python package, but that's obviously not the case, nor on any other location where it can be found via the $PATH
.
也许这是真的。链接/usr/bin/python2 ->(真正的链接)应该由您的Python包提供,但显然不是这样,也不是在任何其他可以通过$PATH找到它的位置。
You should put the said link in your path at the (an) appropriate place.
你应该把上述链接放在你的路径在(an)适当的地方。
#2
10
Try this command in terminal
在终端上试试这个命令
sudo ln -s /usr/bin/python2.6 /usr/bin/python2
sudo ln -s /usr/ binon2.6 /usr/ binon2
or
或
sudo apt-get install python2
sudo apt-get安装python2
#3
1
On Ubuntu 12.04.
在Ubuntu 12.04。
To find out what package owns the file:
找出文件属于哪个包:
$ apt-file -F find /usr/bin/python2
python-minimal: /usr/bin/python2
To find out what packages depend on the package:
了解哪些包取决于包:
$ apt-cache rdepends python-minimal
python-minimal
Reverse Depends:
python2.7-minimal
|livecd-rootfs
python-minimal:i386
python-support
python2.7-minimal
python
|livecd-rootfs
It show that if you have python
package then you should have python-minimal
package then you should have /usr/bin/python2
file.
它显示如果您有python包,那么您应该拥有python-最小包,那么您应该拥有/usr/bin/python2文件。
Check whether /usr/bin
is in $PATH
inside emacs. If it is and you can't run /usr/bin/python2
from a shell then you could reinstall python-minimal
to restore /usr/bin/python2
file:
检查emacs中的/usr/bin是否在$PATH中。如果是的话,你不能从shell中运行/usr/bin/python2,那么你可以重新安装python-最小化来恢复/usr/bin/python2文件:
$ sudo apt-get --reinstall install python-minimal