python ubuntu virtualenv ->;错误
新人来了,请多多指教。
有一天我是:
sudo apt-get install python-virtualenv
然后我是(按照说明):
virtualenv env
Ubuntu 10.10 就像:
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2675, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 552, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: virtualenv==1.5.1
什么给出了?
Newbie here, be kind.
The other day I am all:
sudo apt-get install python-virtualenv
And then I am (following instructions):
virtualenv env
And Ubuntu 10.10 is like:
Traceback (most recent call last):
File "/usr/local/bin/virtualenv", line 5, in <module>
from pkg_resources import load_entry_point
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 2675, in <module>
parse_requirements(__requires__), Environment()
File "/usr/lib/python2.6/dist-packages/pkg_resources.py", line 552, in resolve
raise DistributionNotFound(req)
pkg_resources.DistributionNotFound: virtualenv==1.5.1
What gives?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
升级到 Ubuntu 11.04 后遇到了同样的问题。
事实证明,这只是因为 apt 安装了 python-virtualenv 1.4,它太旧了。
我删除了 deb 包并使用
pip install
代替,它工作得很好。Had the same issue after upgrading to Ubuntu 11.04..
Turns out it was only because apt installed python-virtualenv 1.4, which was too old.
I removed the deb package and used
pip install
instead and it worked fine.python-virtualenv
软件包应该已在/usr/bin/
中安装了virtualenv
。相反,回溯错误消息表明您正在运行
/usr/local/bin/virtualenv
。也许卸载virtualenv
的/usr/local
版本,然后重试。The
python-virtualenv
package should have installedvirtualenv
in/usr/bin/
.Instead, the traceback error message says you are running
/usr/local/bin/virtualenv
. Perhaps uninstall the/usr/local
version ofvirtualenv
, and try again.