Reputation: 3156
I have a project at work I'm converting to pipenv. When I first run pipenv install
, it starts fine, but multiple dependencies fail. When I run pip install -r requirements.txt
, I have no problem. I'm trying to figure out what I may have done wrong.
The resulting pipfile:
[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true
[requires]
python_version = "2.7"
[dev-packages]
[packages]
boto = "*"
boto3 = "*"
cssmin = "*"
dropbox = "*"
gunicorn = "*"
ipdb = "*"
libsass = "*"
marshmallow = "*"
mock = "*"
networkx = "*"
newrelic = "*"
oauth2client = "*"
pandas = "*"
psycopg2 = "*"
pygsheets = "*"
pytest = "*"
pytest-cov = "*"
pytest-pep8 = "*"
python-dotenv = "*"
redis = "*"
requests = "*"
six = "==1.10.0"
scipy = "*"
seaborn = "*"
matplotlib = "*"
python-memcached = "*"
slackclient = "*"
snowflake-sqlalchemy = "*"
sqlalchemy-redshift = "*"
sqlparse = "*"
unicodecsv = "*"
urllib3 = "==1.23"
typing = "*"
Authlib = "*"
Flask-Assets = "*"
Flask-Breadcrumbs = "*"
Flask-Cache = "*"
Flask = "*"
Flask-Session = "*"
Flask-WTF = "*"
SQLAlchemy = "*"
GitPython = "*"
XlsxWriter = "*"
I get the error
[pipenv.exceptions.InstallError]: File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/cli/command.py", line 254, in install
[pipenv.exceptions.InstallError]: editable_packages=state.installstate.editables,
[pipenv.exceptions.InstallError]: File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/core.py", line 1874, in do_install
[pipenv.exceptions.InstallError]: keep_outdated=keep_outdated
[pipenv.exceptions.InstallError]: File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/core.py", line 1253, in do_init
[pipenv.exceptions.InstallError]: pypi_mirror=pypi_mirror,
[pipenv.exceptions.InstallError]: File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/core.py", line 862, in do_install_dependencies
[pipenv.exceptions.InstallError]: _cleanup_procs(procs, False, failed_deps_queue, retry=False)
[pipenv.exceptions.InstallError]: File "/usr/local/Cellar/pipenv/2018.11.26_2/libexec/lib/python3.7/site-packages/pipenv/core.py", line 681, in _cleanup_procs
[pipenv.exceptions.InstallError]: raise exceptions.InstallError(c.dep.name, extra=err_lines)
[pipenv.exceptions.InstallError]: ['Collecting aiohttp==3.5.4 (from -r /var/folders/zg/kh23lx793dv9n9wrnpnltrtw0000gn/T/pipenv-b12npo6l-requirements/pipenv-a976t3ma-requirement.txt (line 1))']
[pipenv.exceptions.InstallError]: ["DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.", ' ERROR: Could not find a version that satisfies the requirement aiohttp==3.5.4 (from -r /var/folders/zg/kh23lx793dv9n9wrnpnltrtw0000gn/T/pipenv-b12npo6l-requirements/pipenv-a976t3ma-requirement.txt (line 1)) (from versions: 0.1, 0.2, 0.3, 0.4, 0.4.1, 0.4.2, 0.4.3, 0.4.4, 0.5.0, 0.6.0, 0.6.1, 0.6.2, 0.6.3, 0.6.4, 0.6.5, 0.7.0, 0.7.1, 0.7.2, 0.7.3, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.8.4, 0.9.0, 0.9.1, 0.9.2, 0.9.3, 0.10.0, 0.10.1, 0.10.2, 0.11.0, 0.12.0, 0.13.0, 0.13.1, 0.14.0, 0.14.1, 0.14.2, 0.14.3, 0.14.4, 0.15.0, 0.15.1, 0.15.2, 0.15.3, 0.16.0, 0.16.1, 0.16.2, 0.16.3, 0.16.4, 0.16.5, 0.16.6, 0.17.0, 0.17.1, 0.17.2, 0.17.3, 0.17.4, 0.18.0, 0.18.1, 0.18.2, 0.18.3, 0.18.4, 0.19.0, 0.20.0, 0.20.1, 0.20.2, 0.21.0, 0.21.1, 0.21.2, 0.21.4, 0.21.5, 0.21.6, 0.22.0a0, 0.22.0b0, 0.22.0b1, 0.22.0b2, 0.22.0b3, 0.22.0b4, 0.22.0b5, 0.22.0b6, 0.22.0, 0.22.1, 0.22.2, 0.22.3, 0.22.4, 0.22.5, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.5, 1.1.0, 1.1.1, 1.1.2, 1.1.3, 1.1.4, 1.1.5, 1.1.6, 1.2.0, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 2.0.0rc1, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.0.4, 2.0.5, 2.0.6.post1, 2.0.7, 2.1.0, 2.2.0, 2.2.1, 2.2.2, 2.2.3, 2.2.4, 2.2.5, 2.3.0a4, 2.3.0, 2.3.1, 2.3.2b2)', 'ERROR: No matching distribution found for aiohttp==3.5.4 (from -r /var/folders/zg/kh23lx793dv9n9wrnpnltrtw0000gn/T/pipenv-b12npo6l-requirements/pipenv-a976t3ma-requirement.txt (line 1))']
But a lot of other packages fail as well. The error shows it using Python 3.7, which is my global version, but I ran all the above commands in a Python 2.7.16 shell, started by pipenv itself (using pipenv shell
). Even without the shell, as I explicitly listed the Python version in the pipfile, I would expect pipenv to install packages matching the version, though maybe this is a faulty assumption?
Upvotes: 2
Views: 2641
Reputation: 21
Is pip install -r requirements.txt
actually using python 2.7? run pip -V
to confirm. aiohttp==3.5.4 requires Python 3.5.3+ per the documentation
Upvotes: 1