帮助解决 Virtualenv 中的 DistributionNotFound 错误
我已经在我的系统上安装了 virtualenv ,其参数是不复制任何站点包。然后我做了一个 easy_install
来安装 Django,结果也很顺利。
在虚拟环境中,当我尝试django-admin.py
时,我收到一个无法解决的错误。有人可以帮我吗?非常感谢。
(virt1) C:\virt_env\virt1>Scripts\django-admin.py
Traceback (most recent call last):
File "C:\virt_env\virt1\Scripts\django-admin.py", line 4, in <module>
import pkg_resources
File "C:\Program_Files\Python27\lib\site-packages\pkg_resources.py", line 2607, in <module>
parse_requirements(__requires__), Environment()
File "C:\Program_Files\Python27\lib\site-packages\pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: django==1.3
I've installed virtualenv
on my system which the argument to not copy over any site packages. Then I did an easy_install
to install Django and that went fine too.
In the virtual environ when i try and try django-admin.py
, I get an error that I'm not being able to resolve. Could someone help me out please? Thanks a ton.
(virt1) C:\virt_env\virt1>Scripts\django-admin.py
Traceback (most recent call last):
File "C:\virt_env\virt1\Scripts\django-admin.py", line 4, in <module>
import pkg_resources
File "C:\Program_Files\Python27\lib\site-packages\pkg_resources.py", line 2607, in <module>
parse_requirements(__requires__), Environment()
File "C:\Program_Files\Python27\lib\site-packages\pkg_resources.py", line 565, in resolve
raise DistributionNotFound(req) # XXX put more info here
pkg_resources.DistributionNotFound: django==1.3
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为
easy_install
不了解virtualenv
。请改用pip
。I don't think
easy_install
knows aboutvirtualenv
. Usepip
instead.