几个星期前我用python2.7创建了一个virtualenv,这个项目运行正常。它使用setuptools并定义了一些控制台脚本。
今天我安装了python3和pip3,我认为这不会与这个项目冲突,但是当我尝试运行相同的控制台脚本时,我遇到了这个错误。
pkg_resources.DistributionNotFound: myproject==1.0.0.0-local
Traceback (most recent call last):
File "/Users/me/dev/myproject/venv-myproject/bin/run_queue_worker_manager", line 5, in <module>
from pkg_resources import load_entry_point
File "/Users/me/dev/project/venv-myproject/lib/python2.7/site-packages/pkg_resources.py", line 2720, in <module>
parse_requirements(__requires__), Environment()
File "/Users/me/dev/project/venv-myproject/lib/python2.7/site-packages/pkg_resources.py", line 588, in resolve
raise DistributionNotFound(req)