我创建了我的第一个包。当我尝试用pip在新创建的virtualenv中安装它时,我得到一个错误,指示不能导入libs,但是它们被添加到setup.py
中的install_requires
字段中。如果我在维鲁阿连夫外面做,一切都没问题。
我的设置.py在这里:https://github.com/tdi/pyPEPA/blob/dev/setup.py
要重现错误:
mkvirtualenv something -p /usr/bin/python3
workon something
pip install pypepa
一。在
^{pr2}$
Python3使用distutils,
setup()
将使用requires
关键字参数。来自the docs:把你的
install_requires
改成requires
你设置.py脚本。在安装脚本导入pypepapypepa.pepa_模型它导入了pyparsing,但是pyparsing还没有安装(我们甚至还没有运行完安装脚本来知道依赖关系是什么)。解决方案是在pypepa和设置.py(这样您就可以删除导入),或者不在\uu init_uu.py中导入PEPAModel。在
相关问题 更多 >
编程相关推荐