版本pip 21.2.4 Python 3.6
命令:
pip install -r requirements.txt
我的内容requirements.txt
:
mongoengine==0.19.1
numpy==1.16.2
pylint
pandas==1.1.5
fawkes
命令失败,并显示此错误
ERROR: Command errored out with exit status 1:
command: /Users/*/Desktop/ml/*/venv/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/kn/0y92g7x55qs7c42tln4gwhtm0000gp/T/pip-install-soh30mel/mongoengine_89e68f8427244f1bb3215b22f77a619c/setup.py'"'"'; __file__='"'"'/private/var/folders/kn/0y92g7x55qs7c42tln4gwhtm0000gp/T/pip-install-soh30mel/mongoengine_89e68f8427244f1bb3215b22f77a619c/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /private/var/folders/kn/0y92g7x55qs7c42tln4gwhtm0000gp/T/pip-pip-egg-info-97994d6e
cwd: /private/var/folders/kn/0y92g7x55qs7c42tln4gwhtm0000gp/T/pip-install-soh30mel/mongoengine_89e68f8427244f1bb3215b22f77a619c/
Complete output (1 lines):
error in mongoengine setup command: use_2to3 is invalid.
----------------------------------------
WARNING: Discarding https://*/pypi/packages/mongoengine-0.19.1.tar.gz#md5=68e613009f6466239158821a102ac084 (from https://*/pypi/simple/mongoengine/). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
ERROR: Could not find a version that satisfies the requirement mongoengine==0.19.1 (from versions: 0.15.0, 0.19.1)
ERROR: No matching distribution found for mongoengine==0.19.1
6条答案
按热度按时间disbfnqx1#
setuptools>=58
似乎中断了对use_2to3
的支持:安装工具v58的更改日志
因此,您应该将
setuptools
更新为setuptools<58
,或者避免在设置参数中使用带有use_2to3
的软件包。我遇到了同样的问题,
pip==19.3.1
weylhg0b2#
我安装了
setuptools==58
它为我工作。pip install setuptools==58
。错误来自以前在我的设备上运行的setuptools==69
。最后为我保存了setuptools版本58用于此错误。vngu2lb83#
“pip install setuptools==58”对我很有效。当我把ubuntu升级到22.04和python 3.10时,setuptools的版本是59。我为一个现有的django项目启动了一个干净的虚拟环境。它只有两个包:
'pip列表包版本
设置工具
然后我把setuptools降级到58,pip install setuptools==58.0.0,之后pip install -r requirements.txt就没有上面的错误了。
gwo2fgha4#
将MongoEngine升级到〉= 0.20也可以解决Python2支持(因此
use_2to3
)在0.20中被删除的问题jucafojl5#
这对我很有效。
efzxgjgh6#
我在Windows 11上工作,这些解决方案不起作用。我安装了pybluez2代替。你的python版本〉= 3.9在Windows上。