I’m setting up an existing project and when I am running pip install -r requirements.txt
After every dependency is installed it gives this error:
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-d0j9czw9/supervisor/
This is the list of complete installation
(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/
I have seen similar questions but their solutions don’t work on mine, so far I have tried these to resolve the issue
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
This might not be relevant but just for the background this is the error for installation 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/
This is the requirement.txt file
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
How can I solve the error?
3
Answers
The error is right at the end:
Your requirements.txt contains [PyPI]: supervisor but requires v3.2.1 which is Python 2 compatible only.
To get past this, either:
Edit requirements.txt and remove the Supervisor version reference:
supervisor==3.2.1
by e.g.supervisor==4.0.0
(which is the 1st version that supports Python 3)Switch to Python 2 (not recommended, as it reached its end of life and many 3rd-party packages no longer support it)
There’s a high chance (no matter which variant you’d choose), that additional changes are required, due to inter package version dependencies. You’ll have to solve them all.
Probably, the simplest way would be to create a copy of requirements.txt, and remove all the package versions. So, each line like:
would simply become:
and pass the modified file as an argument to PIP (and thus let it download and install the newest available version for each package).
Update #0
You’re quite in a pickle, as NeuralPy wasn’t ported to Python 3. If you have a legacy project that needs all the packages, then you should switch to Python 2. Otherwise, you should check which ones you really need (and check for Python 3 compatible versions) and discard the others.
You’re setting up an existing project with
"pip install -r requirements.txt"
and are getting the following error:
It appears that your requirements.txt file is providing information to install an old package that is nor supported on Python 3. Maybe check out the Supervisor site and see how to upgrade to Supervisor 3?
Installing setuptools lower than version 58 worked for me.
Then install supervisor.
**This works for anyjson package too.