![](/img/trans.png)
[英]Why does 'pip' require “setuptools >= 0.8” even though I have 2.1 installed?
[英]Why does `pip install -e` give me a "no module named 'setuptools'" error even though I have setuptools installed?
I am trying to install a work-in-progress package in a conda environment as an editable package via pip install -e
, but I get a "no module named 'setuptools'", even though I have verified that setuptools is properly installed in环境(我可以将它导入到环境中的 python session 中)。
我有一个最小的setup.py
:
import setuptools
if __name__ == "__main__":
setuptools.setup()
有关如何解决此问题并将我的 package 安装在可编辑的 state 中的任何建议? 我还查看了这个堆栈溢出问题,但没有找到适合我的情况的答案。
完整的错误回溯如下:
ERROR: Command errored out with exit status 1:
command: /nfs/nhome/live/jbhagat/.conda/envs/aeon_env/bin/python -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/ceph/aeon/aeon/code/ProjectAeon/aeon/setup.py'"'"'; __file__='"'"'/ceph/aeon/aeon/code/ProjectAeon/aeon/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' develop --no-deps
cwd: /ceph/aeon/aeon/code/ProjectAeon/aeon/
Complete output (3 lines):
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'setuptools'
编辑:更新:有趣的是,如果我注释掉setup.py
文件中的所有行,我会得到同样的错误。 如果我删除我的setup.py
,我会收到一条错误消息,指出setup.py
是安装可编辑 package 所必需的。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.