命令"python setup.py egg_info"失败,错误代码为 1 in /tmp/pip-install-xaum7z8f/supervisor/



我正在设置一个现有的项目,当我运行pip install -r requirements.txt

安装每个依赖项后,都会出现以下错误:Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-d0j9czw9/supervisor/

这是完整安装的列表

(venv) rehman@localhost:~/projects/cmdj3/cmdj3$ pip install -r requirements.txt 
Collecting git+https://github.com/aaronsw/pytorctl.git (from -r requirements.txt (line 39))
Cloning https://github.com/aaronsw/pytorctl.git to /tmp/pip-req-build-s3aouchw
Collecting Django==1.9.7 (from -r requirements.txt (line 1))
Downloading https://files.pythonhosted.org/packages/e6/f9/154e1460c4a95c90ab28ead50314161ea2c4016f3561033b41f687f0a76d/Django-1.9.7-py2.py3-none-any.whl (6.6MB)
100% |████████████████████████████████| 6.6MB 102kB/s 
Collecting Fabric==1.11.1 (from -r requirements.txt (line 2))
Downloading https://files.pythonhosted.org/packages/e5/73/49d96ea3f4e8b7b707cbfd7c78a601691ea75f479204cefe5aa459e11c2b/Fabric-1.11.1.tar.gz (215kB)
100% |████████████████████████████████| 225kB 106kB/s 
Collecting GeoIP==1.3.2 (from -r requirements.txt (line 3))
Downloading https://files.pythonhosted.org/packages/f2/7b/a463b7c3df8ef4b9c92906da29ddc9e464d4045f00c475ad31cdb9a97aae/GeoIP-1.3.2.tar.gz
Collecting Markdown==2.6.6 (from -r requirements.txt (line 4))
Downloading https://files.pythonhosted.org/packages/9b/53/4492f2888408a2462fd7f364028b6c708f3ecaa52a028587d7dd729f40b4/Markdown-2.6.6.tar.gz (302kB)
100% |████████████████████████████████| 307kB 87kB/s 
Collecting mysqlclient (from -r requirements.txt (line 5))
Downloading https://files.pythonhosted.org/packages/d0/97/7326248ac8d5049968bf4ec708a5d3d4806e412a42e74160d7f266a3e03a/mysqlclient-1.4.6.tar.gz (85kB)
100% |████████████████████████████████| 92kB 22kB/s 
Collecting Pillow==3.3.0 (from -r requirements.txt (line 6))
Downloading https://files.pythonhosted.org/packages/e0/27/f61098a12f14690689924de93ffdd101463083a80bf8ff3e0c218addf05b/Pillow-3.3.0.tar.gz (10.6MB)
100% |████████████████████████████████| 10.6MB 58kB/s 
Collecting Unidecode==0.04.19 (from -r requirements.txt (line 7))
Downloading https://files.pythonhosted.org/packages/5a/73/053be0fafe387d41ce705585412808093f5a333aaa71cabbab641f677c11/Unidecode-0.04.19.tar.gz (204kB)
100% |████████████████████████████████| 204kB 148kB/s 
Collecting amqp==1.4.9 (from -r requirements.txt (line 8))
Downloading https://files.pythonhosted.org/packages/ed/09/314d2788aba0aa91f2578071a6484f87a615172a98c309c2aad3433da90b/amqp-1.4.9-py2.py3-none-any.whl (51kB)
100% |████████████████████████████████| 61kB 62kB/s 
Collecting anyjson==0.3.3 (from -r requirements.txt (line 9))
Downloading https://files.pythonhosted.org/packages/c3/4d/d4089e1a3dd25b46bebdb55a992b0797cff657b4477bc32ce28038fdecbc/anyjson-0.3.3.tar.gz
Collecting argparse==1.2.1 (from -r requirements.txt (line 10))
Downloading https://files.pythonhosted.org/packages/6f/ad/86448942ad49c5fe05bfdf7ebc874807f521dfcca5ee543afaca2974ad5a/argparse-1.2.1.tar.gz (69kB)
100% |████████████████████████████████| 71kB 114kB/s 
Collecting beautifulsoup4==4.2.1 (from -r requirements.txt (line 11))
Downloading https://files.pythonhosted.org/packages/df/b8/30ea521e7a852202445b30660df5981b94acfeccda15d2bc5a03d97b500a/beautifulsoup4-4.2.1.tar.gz (64kB)
100% |████████████████████████████████| 71kB 141kB/s 
Collecting billiard==3.3.0.22 (from -r requirements.txt (line 12))
Downloading https://files.pythonhosted.org/packages/c4/76/198fdcf8de40190bfaa70e61c6dfcc67141ebaef3adf0c0c7f360a9ecec3/billiard-3.3.0.22.tar.gz (151kB)
100% |████████████████████████████████| 153kB 76kB/s 
Collecting celery==3.1.18 (from -r requirements.txt (line 13))
Downloading https://files.pythonhosted.org/packages/94/50/2b824c2a2b53a05763a71138fa494f913b272511ead9757522a9ab3c0077/celery-3.1.18-py2.py3-none-any.whl (515kB)
100% |████████████████████████████████| 522kB 131kB/s 
Collecting colorama==0.2.5 (from -r requirements.txt (line 14))
Downloading https://files.pythonhosted.org/packages/fc/87/17f7dfcc3632b01972aa64cf97db20498f96ae206c8caa066ca47f304d44/colorama-0.2.5.tar.gz
Collecting configobj (from -r requirements.txt (line 15))
Downloading https://files.pythonhosted.org/packages/64/61/079eb60459c44929e684fa7d9e2fdca403f67d64dd9dbac27296be2e0fab/configobj-5.0.6.tar.gz
Collecting django-celery==3.1.17 (from -r requirements.txt (line 16))
Downloading https://files.pythonhosted.org/packages/56/cc/6b9731091887dcb1c76ef48521e580bb2b0f469e6f4934072aac75a478f3/django-celery-3.1.17.tar.gz (79kB)
100% |████████████████████████████████| 81kB 106kB/s 
Collecting django-filter==0.13.0 (from -r requirements.txt (line 17))
Downloading https://files.pythonhosted.org/packages/cd/94/59853d25079093540f4a36c5cde4e34be6f4d69d06771a79e9441613b6ce/django_filter-0.13.0-py2.py3-none-any.whl
Collecting django-mailchimp-v1.3==1.4.0 (from -r requirements.txt (line 18))
Downloading https://files.pythonhosted.org/packages/58/31/e5e3e4dfb38b28d03ed7176b1e676f52e8a7ccbd009cc3f476b1505591f9/django-mailchimp-v1.3-1.4.0.tar.gz
Collecting djangorestframework==3.4.1 (from -r requirements.txt (line 19))
Downloading https://files.pythonhosted.org/packages/4c/cc/ea4200c9bdcbbba855825789e509b69803a8f04e32d9c9d97e52d4da6e25/djangorestframework-3.4.1-py2.py3-none-any.whl (705kB)
100% |████████████████████████████████| 706kB 112kB/s 
Collecting google-api-python-client==1.6.2 (from -r requirements.txt (line 20))
Downloading https://files.pythonhosted.org/packages/08/85/e43f6d6cb7ea69b580cf2499ed91ea7a6c6eda5c2081305039d088957400/google_api_python_client-1.6.2-py2.py3-none-any.whl (52kB)
100% |████████████████████████████████| 61kB 104kB/s 
Collecting html5lib==0.999 (from -r requirements.txt (line 21))
Downloading https://files.pythonhosted.org/packages/fc/37/a7d7d3e5151e4ff0d364cc47a52d18c334eee60485b7318550b8e09f9d53/html5lib-0.999.tar.gz (885kB)
100% |████████████████████████████████| 890kB 74kB/s 
Collecting httplib2==0.10.3 (from -r requirements.txt (line 22))
Downloading https://files.pythonhosted.org/packages/e4/2e/a7e27d2c36076efeb8c0e519758968b20389adf57a9ce3af139891af2696/httplib2-0.10.3.tar.gz (204kB)
100% |████████████████████████████████| 204kB 145kB/s 
Collecting kombu==3.0.37 (from -r requirements.txt (line 23))
Downloading https://files.pythonhosted.org/packages/4d/0e/73ac0df8949bdb6ad81812110962b38e6bb4243c3bfdad2d9e90b5509e2e/kombu-3.0.37-py2.py3-none-any.whl (240kB)
100% |████████████████████████████████| 245kB 40kB/s 
Collecting meld3==1.0.2 (from -r requirements.txt (line 25))
Downloading https://files.pythonhosted.org/packages/b6/ae/e6d731e4b9661642c1b20591d8054855bb5b8281cbfa18f561c2edd783f7/meld3-1.0.2-py2.py3-none-any.whl
Collecting mysql-connector (from -r requirements.txt (line 26))
Downloading https://files.pythonhosted.org/packages/28/04/e40098f3730e75bbe36a338926f566ea803550a34fb50535499f4fc4787a/mysql-connector-2.2.9.tar.gz (11.9MB)
100% |████████████████████████████████| 11.9MB 86kB/s 
Collecting oauth2 (from -r requirements.txt (line 27))
Downloading https://files.pythonhosted.org/packages/a0/6f/86db603912ecd04109af952c38bc08928886cf0e34c723481fa7db98b4b5/oauth2-1.9.0.post1-py2.py3-none-any.whl
Collecting oauth2client (from -r requirements.txt (line 28))
Downloading https://files.pythonhosted.org/packages/95/a9/4f25a14d23f0786b64875b91784607c2277eff25d48f915e39ff0cff505a/oauth2client-4.1.3-py2.py3-none-any.whl (98kB)
100% |████████████████████████████████| 102kB 197kB/s 
Collecting python-Levenshtein (from -r requirements.txt (line 31))
Downloading https://files.pythonhosted.org/packages/42/a9/d1785c85ebf9b7dfacd08938dd028209c34a0ea3b1bcdb895208bd40a67d/python-Levenshtein-0.12.0.tar.gz (48kB)
100% |████████████████████████████████| 51kB 152kB/s 
Collecting python-dateutil (from -r requirements.txt (line 32))
Downloading https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227kB)
100% |████████████████████████████████| 235kB 102kB/s 
Collecting redis (from -r requirements.txt (line 33))
Downloading https://files.pythonhosted.org/packages/f0/05/1fc7feedc19c123e7a95cfc9e7892eb6cdd2e5df4e9e8af6384349c1cc3d/redis-3.4.1-py2.py3-none-any.whl (71kB)
100% |████████████████████████████████| 71kB 57kB/s 
Collecting requests==2.9.1 (from -r requirements.txt (line 34))
Downloading https://files.pythonhosted.org/packages/b8/f7/3bb4d18c234a8ce7044d5ee2e1082b7d72bf6c550afb8d51ae266dea56f1/requests-2.9.1-py2.py3-none-any.whl (501kB)
100% |████████████████████████████████| 501kB 146kB/s 
Collecting six==1.10.0 (from -r requirements.txt (line 35))
Downloading https://files.pythonhosted.org/packages/c8/0a/b6723e1bc4c516cb687841499455a8505b44607ab535be01091c0f24f079/six-1.10.0-py2.py3-none-any.whl
Collecting stripe==1.46.0 (from -r requirements.txt (line 37))
Downloading https://files.pythonhosted.org/packages/28/8d/445fa6d2e4350429b9034bdccdf75bcb4a9eb33c232f7f1fac9278fe7239/stripe-1.46.0-py3-none-any.whl (200kB)
100% |████████████████████████████████| 204kB 164kB/s 
Collecting supervisor==3.2.1 (from -r requirements.txt (line 38))
Downloading https://files.pythonhosted.org/packages/7b/54/53f28cb2b652717134dd67af607a94952318ae542906f0a890043de4f466/supervisor-3.2.1.tar.gz (410kB)
100% |████████████████████████████████| 419kB 150kB/s 
Complete output from command python setup.py egg_info:
Supervisor requires Python 2.4 or later but does not work on any version of Python 3.  You are using version 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0].  Please install using a supported version.
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-d0j9czw9/supervisor/

我看到过类似的问题,但他们的解决方案对我不起作用,到目前为止,我已经尝试过这些来解决问题


sudo apt-get install python-bs4
pip install scikit-learn
pip install neuralpy #this didn't get installed, it has a new error pasted below with *
pip install --upgrade setuptools 
pip install progressbar33

这可能不相关,但仅针对后台,这是安装neuralpy的错误

Collecting neuralpy
Downloading https://files.pythonhosted.org/packages/aa/6f/5d4f1c90fd944108d63428a33fae99d931da110cf13a8c64991474d87f90/neuralpy-1.3.0.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/tmp/pip-install-carjls1c/neuralpy/setup.py", line 2
print find_packages(exclude=['DEPneuralpy'])
^
SyntaxError: invalid syntax
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-carjls1c/neuralpy/

这是requirement.txt文件

Django==1.9.7
Fabric==1.11.1
GeoIP==1.3.2
Markdown==2.6.6
mysqlclient
Pillow==3.3.0
Unidecode==0.04.19
amqp==1.4.9
anyjson==0.3.3
argparse==1.2.1
beautifulsoup4==4.2.1
billiard==3.3.0.22
celery==3.1.18
colorama==0.2.5
configobj
django-celery==3.1.17
django-filter==0.13.0
django-mailchimp-v1.3==1.4.0
djangorestframework==3.4.1
google-api-python-client==1.6.2
html5lib==0.999
httplib2==0.10.3
kombu==3.0.37
#newspaper == 0.1.0.7
meld3==1.0.2
mysql-connector
oauth2
oauth2client
#pyinotify
#pyserial
python-Levenshtein
python-dateutil
redis
requests==2.9.1
six==1.10.0
#ssh-import-id
stripe==1.46.0
supervisor==3.2.1
git+https://github.com/aaronsw/pytorctl.git
uritemplate==3.0.0
urllib3==1.7.1
vine==1.1.3
wsgiref==0.1.2
#zope.interface==4.0.5
pyyaml
ua-parser
user-agents
django-user-agents
raven
pyasn1
ndg-httpsclient
pyjwkest
social-auth-app-django
social-auth-core
django-ckeditor==5.4.0
django-hijack
django-hijack-admin

我该如何解决错误?

错误就在最后:

Collecting supervisor==3.2.1 (from -r requirements.txt (line 38))
Downloading https://files.pythonhosted.org/packages/7b/54/53f28cb2b652717134dd67af607a94952318ae542906f0a890043de4f466/supervisor-3.2.1.tar.gz (410kB)
100% |████████████████████████████████| 419kB 150kB/s 
Complete output from command python setup.py egg_info:
Supervisor requires Python 2.4 or later but does not work on any version of Python 3.  You are using version 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0].  Please install using a supported version.

您的requirements.txt包含[PyPI]:supervisor,但需要v3.2.1,该版本仅与Python 2兼容

要克服这一点,请选择:

  1. 编辑requirements.txt并删除Supervisor版本参考:

    • 将行supervisor==3.2.1替换为例如supervisor==4.0.0(这是支持Python 3的1st版本(
  2. 切换到Python 2(不推荐使用,因为它已经到了生命的尽头,许多3rd第三方包不再支持它(

由于包间版本依赖性,很有可能(无论您选择哪种变体(需要进行额外的更改。你必须解决所有问题。

最简单的方法可能是创建requirements.txt的副本,并删除所有包版本。所以,每一行都像:

package==version

会简单地变成:

package

并将修改后的文件作为参数传递给PIP(从而让它下载并安装每个包的最新可用版本(。



更新#0

由于NeuralPy没有移植到Python3,因此您陷入了困境。如果您有一个需要所有包的遗留项目,那么您应该切换到Python 2。否则,您应该检查您真正需要的版本(并检查Python3兼容的版本(,然后丢弃其他版本。

您正在使用设置现有项目

"pip install -r requirements.txt"

并且得到以下错误:

Supervisor需要Python 2.4或更高版本,但不适用于任何版本的Python 3。您使用的是版本3.7.3(默认,2019年12月20日18:57:59(

您的requirements.txt文件似乎提供了安装Python 3上不支持的旧软件包的信息。也许可以查看Supervisor网站,看看如何升级到Supervisor 3?

安装低于58版本的setuptools对我有效。

pip install setuptools==50.3.2

然后安装监督员。

**这也适用于任何json包。

相关内容

最新更新