Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pipenv fails to install all my packages, and then installs all of them #1356

Closed
jacek-jablonski opened this issue Jan 25, 2018 · 65 comments
Closed
Labels
Type: Bug 🐛 This issue is a bug.

Comments

@jacek-jablonski
Copy link

jacek-jablonski commented Jan 25, 2018

Hi, it might be something that I do not understand or so. I have 2 sources specified and none of them is official pypi, but mirrors, so here is my Pipfile:

[[source]]

url = "https://company/api/pypi/pypi.python.org/simple"
verify_ssl = true
name = "pypi"


[[source]]

url = "https://company/api/pypi/pypi-local/simple"
verify_ssl = true
name = "pypi-local"


[packages]

cachetools = "==2.0.1"
click = "==6.2"
data-object = "==1.2.1"
flask-cache = "==0.13.1"
flask-classy = "==0.6.10"
flask-humanize = "==0.3.0"
flask-migrate = "==2.1.1"
flask-oauthlib = "==0.9.4"
flask-sqlalchemy = "==2.3.2"
flask-wtf = "==0.14.2"
flask = "==0.12.2"
huey = "==1.6.0"
pendulum = "==1.4.0"
pyyaml = "==3.12"
redis = "==2.10.6"
requests = "==2.18.4"
requests-cache = "==0.4.13"
sqlalchemy = "==1.2.1"
whitenoise = "==3.3.1"
gunicorn = "==19.7.1"


[dev-packages]

ipdb = "*"
ipython = "*"
flask-shell-ipython = "*"
coverage = "*"
flake8 = "*"
flask-debugtoolbar = "*"
Describe your environment
  1. OS Type Ubuntu
  2. Python version: $ python -V Python 3.6.1
  3. Pipenv version: $ pipenv --version pipenv, version 9.0.3
Expected result

All packages installed immediatly.

Actual result
Installing dependencies from Pipfile.lock (7e9249)…
An error occurred while installing blinker==1.4! Will try again.
An error occurred while installing click==6.2! Will try again.
An error occurred while installing coverage==4.4.2! Will try again.
An error occurred while installing decorator==4.2.1! Will try again.
An error occurred while installing flask-debugtoolbar==0.10.1! Will try again.
An error occurred while installing flask-shell-ipython==0.3.0! Will try again.
An error occurred while installing ipdb==0.10.3! Will try again.
An error occurred while installing ipython==6.2.1! Will try again.
An error occurred while installing ipython-genutils==0.2.0! Will try again.
An error occurred while installing jedi==0.11.1! Will try again.
An error occurred while installing parso==0.1.1! Will try again.
An error occurred while installing pexpect==4.3.1; sys_platform != 'win32'! Will try again.
An error occurred while installing pickleshare==0.7.4! Will try again.
An error occurred while installing prompt-toolkit==1.0.15! Will try again.
An error occurred while installing ptyprocess==0.5.2! Will try again.
An error occurred while installing pygments==2.2.0! Will try again.
An error occurred while installing simplegeneric==0.8.1! Will try again.
An error occurred while installing traitlets==4.3.2! Will try again.
An error occurred while installing wcwidth==0.1.7! Will try again.
Installing initially–failed dependencies…
Success installing blinker==1.4!
Success installing click==6.7!
Success installing coverage==4.4.2!
Success installing decorator==4.2.1!
Success installing flask-debugtoolbar==0.10.1!
Success installing flask-shell-ipython==0.3.0!
Success installing ipdb==0.10.3!
Success installing ipython==6.2.1!
Success installing ipython-genutils==0.2.0!
Success installing jedi==0.11.1!
Success installing parso==0.1.1!
Success installing pexpect==4.3.1; sys_platform != 'win32'!
Success installing pickleshare==0.7.4!
Success installing prompt-toolkit==1.0.15!
Success installing ptyprocess==0.5.2!
Success installing pygments==2.2.0!
Success installing simplegeneric==0.8.1!
Success installing traitlets==4.3.2!
Success installing wcwidth==0.1.7!
Steps to replicate

pipenv install --system
Please also note, that pipenv is installing click==6.7 despite specifying 6.2 version.

@alexpilk
Copy link

alexpilk commented Feb 2, 2018

I'm also struggling with this issue, are there any updates or solutions?

@techalchemy
Copy link
Member

Hi @JacekJab sorry you are running into this -- the initial failure isn't actually a bug, per se, I'm guessing it is related to concurrent installs from a non-pypi repository. They initially failed and then fell back to sequential installation. As far as the click installation, you will need to provide the full context of the command you ran, your $PATH, the output of env, that stuff would help

@kennethreitz kennethreitz added the Type: Bug 🐛 This issue is a bug. label Feb 13, 2018
@kennethreitz
Copy link
Contributor

closing since they are successful in the end — we'll need much more information in order to replicate

@asyd
Copy link

asyd commented Mar 29, 2018

I have the same issue with latest version of pipenv. I'm curious, @JacekJab are you using Nexus for your repositories?

@pawelswiecki
Copy link

I'm having the same issue. Pretty annoying and should be looked into.

@techalchemy
Copy link
Member

@pawelswiecki please provide details including the output and Pipfile you used per the issue template. Telling us to look into something with no additional detail is not productive and as volunteers would rank pretty high on the list of things we also find annoying

@wjlow
Copy link

wjlow commented May 14, 2018

I'm having the same issue. I'm running tox.

My tox.ini:

[tox]
envlist = flake8-py3
skipsdist = True

[testenv]
passenv=HOME
deps = pipenv
setenv=
    PYTHONPATH = {toxinidir}/dag
commands=
    pipenv install --skip-lock
    pipenv install --dev --skip-lock
    pipenv run flake8 --version
    pipenv run flake8 dag
    pipenv run pytest

My pipfile:

[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"

[packages]
"flake8" = "*"
docker-py = "*"
google-cloud-dataflow = "==2.2.0"
google-cloud-bigquery = "*"
apache-airflow = {extras = ["crypto", "postgres", "hive", "celery", "jdbc", "gcp_api"], version = "==1.9.0"}
paramiko = "*"

[dev-packages]
pytest = "*"
coverage = "*"

[requires]
python_version = "3.6"

The output (truncated because the rest of it is just test output, which is okay):

flake8-py3 installed: You are using pip version 9.0.3, however version 10.0.1 is available.,You should consider upgrading via the 'pip install --upgrade pip' command.,alembic==0.8.10,amqp==2.2.2,apache-airflow==1.9.0,apache-beam==2.2.0,asn1crypto==0.24.0,attrs==17.4.0,avro==1.8.2,Babel==2.5.3,bcrypt==3.1.4,billiard==3.5.0.3,bitarray==0.8.1,bleach==2.1.2,cachetools==2.0.1,celery==4.1.0,certifi==2018.1.18,cffi==1.11.5,chardet==3.0.4,click==6.7,configparser==3.5.0,coverage==4.5.1,crcmod==1.7,croniter==0.3.20,cryptography==2.2.2,dill==0.2.6,docker-py==1.10.6,docker-pycreds==0.2.2,docutils==0.14,flake8==3.5.0,Flask==0.11.1,Flask-Admin==1.4.1,Flask-Cache==0.13.1,Flask-Login==0.2.11,flask-swagger==0.2.13,Flask-WTF==0.14,flower==0.9.2,funcsigs==1.0.0,future==0.16.0,gapic-google-cloud-pubsub-v1==0.15.4,gitdb2==2.0.3,GitPython==2.1.9,google-api-core==1.1.0,google-api-python-client==1.5.5,google-apitools==0.5.11,google-auth==1.4.1,google-auth-httplib2==0.0.3,google-auth-oauthlib==0.2.0,google-cloud-bigquery==0.32.0,google-cloud-core==0.28.1,google-cloud-dataflow==2.2.0,google-cloud-pubsub==0.26.0,google-gax==0.15.16,google-resumable-media==0.3.1,googleapis-common-protos==1.5.3,googledatastore==7.0.1,grpc-google-iam-v1==0.11.4,grpcio==1.10.0,gunicorn==19.7.1,hive-thrift-py==0.0.1,html5lib==1.0.1,httplib2==0.9.2,idna==2.6,impyla==0.14.1,itsdangerous==0.24,JayDeBeApi==1.1.1,Jinja2==2.8.1,JPype1==0.6.3,kombu==4.1.0,lockfile==0.12.2,lxml==3.8.0,Mako==1.0.7,Markdown==2.6.11,MarkupSafe==1.0,mccabe==0.6.1,mock==2.0.0,more-itertools==4.1.0,numpy==1.14.2,oauth2client==2.0.2,oauthlib==2.0.7,ordereddict==1.1,pandas==0.22.0,pandas-gbq==0.4.0,paramiko==2.4.1,pbr==4.0.1,pipenv==11.9.0,pluggy==0.6.0,ply==3.8,proto-google-cloud-datastore-v1==0.90.4,proto-google-cloud-pubsub-v1==0.15.4,protobuf==3.3.0,psutil==4.4.2,psycopg2==2.7.4,py==1.5.3,pyasn1==0.4.2,pyasn1-modules==0.2.1,pycodestyle==2.3.1,pycparser==2.18,pyflakes==1.6.0,Pygments==2.2.0,PyHive==0.5.1,PyNaCl==1.2.1,pyOpenSSL==17.5.0,pytest==3.5.0,python-daemon==2.1.2,python-dateutil==2.7.2,python-editor==1.0.3,python-nvd3==0.14.2,python-slugify==1.1.4,pytz==2018.3,PyYAML==3.12,requests==2.18.4,requests-oauthlib==0.8.0,rsa==3.4.2,setproctitle==1.1.10,six==1.10.0,smmap2==2.0.3,SQLAlchemy==1.2.6,tabulate==0.7.7,thrift==0.11.0,thriftpy==0.3.9,tornado==5.0.1,typing==3.6.4,unicodecsv==0.14.1,Unidecode==1.0.22,uritemplate==3.0.0,urllib3==1.22,vine==1.1.4,virtualenv==15.2.0,virtualenv-clone==0.3.0,webencodings==0.5.1,websocket-client==0.47.0,Werkzeug==0.14.1,WTForms==2.1,zope.deprecation==4.3.0
flake8-py3 runtests: PYTHONHASHSEED='4112944039'
flake8-py3 runtests: commands[0] | pipenv install --skip-lock
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project.
Installing dependencies from Pipfile…
An error occurred while installing apache-airflow[crypto,postgres,hive,celery,jdbc,gcp_api]==1.9.0! Will try again.
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 6/6 — 00:00:02
Installing initially–failed dependencies…
Success installing apache-airflow[crypto,postgres,hive,celery,jdbc,gcp_api]==1.9.0!
  ☤  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:01
flake8-py3 runtests: commands[1] | pipenv install --dev --skip-lock
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project.
Installing dependencies from Pipfile…
An error occurred while installing apache-airflow[crypto,postgres,hive,celery,jdbc,gcp_api]==1.9.0! Will try again.
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 8/8 — 00:00:02
Installing initially–failed dependencies…
Success installing apache-airflow[crypto,postgres,hive,celery,jdbc,gcp_api]==1.9.0!
  ☤  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:01
flake8-py3 runtests: commands[2] | pipenv run flake8 --version
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project.
3.5.0 (mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.6.0) CPython 3.6.4 on Darwin
flake8-py3 runtests: commands[3] | pipenv run flake8 dag
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project.
flake8-py3 runtests: commands[4] | pipenv run pytest
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project.

@techalchemy
Copy link
Member

does this work if you upgrade pip first in your CI build with python -m pip install --upgrade pip?

@wjlow
Copy link

wjlow commented May 14, 2018

Nope, same problem. Here are the steps I took and the output:

Okay I removed .tox/ directory and ran tox. I did this twice and both times I got the following output:

flake8-py3 create: /Users/jack.low/work/dpd_seller_triggers/.tox/flake8-py3
flake8-py3 installdeps: pipenv
flake8-py3 installed: certifi==2018.4.16,pipenv==2018.5.18,virtualenv==15.2.0,virtualenv-clone==0.3.0
flake8-py3 runtests: PYTHONHASHSEED='4227619038'
flake8-py3 runtests: commands[0] | pipenv install --skip-lock
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.
Installing dependencies from Pipfile…
An error occurred while installing apache-airflow[crypto,postgres,hive,celery,jdbc,gcp_api]==1.9.0! Will try again.
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 6/6 — 00:00:35
Installing initially–failed dependencies…
Success installing apache-airflow[crypto,postgres,hive,celery,jdbc,gcp_api]==1.9.0!
  ☤  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:01:12
flake8-py3 runtests: commands[1] | pipenv install --dev --skip-lock
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.
Installing dependencies from Pipfile…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 8/8 — 00:00:08
flake8-py3 runtests: commands[2] | pipenv run flake8 --version
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.
3.5.0 (mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.6.0) CPython 3.6.4 on Darwin
flake8-py3 runtests: commands[3] | pipenv run flake8 dag
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.
flake8-py3 runtests: commands[4] | pipenv run pytest
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.

Now I deleted .tox/ again, and added the following line python -m pip install --upgrade pip to the first command in my tox.ini:

[tox]
envlist = flake8-py3
skipsdist = True

[testenv]
passenv=HOME
deps = pipenv
setenv=
    PYTHONPATH = {toxinidir}/dag
commands=
    python -m pip install --upgrade pip
    pipenv install --skip-lock
    pipenv install --dev --skip-lock
    pipenv run flake8 --version
    pipenv run flake8 dag
    pipenv run pytest

Running tox again gives me this:

flake8-py3 create: /Users/jack.low/work/dpd_seller_triggers/.tox/flake8-py3
flake8-py3 installdeps: pipenv
flake8-py3 installed: certifi==2018.4.16,pipenv==2018.5.18,virtualenv==15.2.0,virtualenv-clone==0.3.0
flake8-py3 runtests: PYTHONHASHSEED='2202490466'
flake8-py3 runtests: commands[0] | python -m pip install --upgrade pip
Requirement already up-to-date: pip in ./.tox/flake8-py3/lib/python3.6/site-packages (10.0.1)
flake8-py3 runtests: commands[1] | pipenv install --skip-lock
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.
Installing dependencies from Pipfile…
An error occurred while installing apache-airflow[crypto,postgres,hive,celery,jdbc,gcp_api]==1.9.0! Will try again.
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 6/6 — 00:00:12
Installing initially–failed dependencies…
Success installing apache-airflow[crypto,postgres,hive,celery,jdbc,gcp_api]==1.9.0!
  ☤  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:30
flake8-py3 runtests: commands[2] | pipenv install --dev --skip-lock
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.
Installing dependencies from Pipfile…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 8/8 — 00:00:06
flake8-py3 runtests: commands[3] | pipenv run flake8 --version
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.
3.5.0 (mccabe: 0.6.1, pycodestyle: 2.3.1, pyflakes: 1.6.0) CPython 3.6.4 on Darwin
flake8-py3 runtests: commands[4] | pipenv run flake8 dag
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.
flake8-py3 runtests: commands[5] | pipenv run pytest
Courtesy Notice: Pipenv found itself running within a virtual environment, so it will automatically use that environment, instead of creating its own for any project. You can set PIPENV_IGNORE_VIRTUALENVS=1 to force pipenv to ignore that environment and create its own instead.

@wjlow
Copy link

wjlow commented May 14, 2018

FYI: Just running python3 -m pip install --upgrade pip manually before running tox gives me the same issue.

I'm not a Python dev so I can't help too much in providing useful info so I apologise ahead of time.

@uranusjr
Copy link
Member

uranusjr commented May 14, 2018

@wjlow I think what @techalchemy meant is you need to upgrade the pip inside the tox-managed environment, not the one used by your project, i.e. add it to the commands config, like this:

commands =
    pipenv run python -m pip install --upgrade pip
    pipenv install --skip-lock
    pipenv install --dev --skip-lock
    pipenv run flake8 --version
    pipenv run flake8 dag
    pipenv run pytest

@wjlow
Copy link

wjlow commented May 14, 2018

Same issue, unfortunately!

@techalchemy techalchemy reopened this May 14, 2018
@techalchemy

This comment has been minimized.

@techalchemy

This comment has been minimized.

@techalchemy
Copy link
Member

Can someone confirm if this is still an issue?

@armona
Copy link

armona commented Jun 28, 2018

I'm having the same issue on my CI machines (gitlab runner). I believe it's happening due to some race condition but I can't really nail it down.

@alexpilk
Copy link

I'm also having it.

@techalchemy
Copy link
Member

Please provide output as it’s not possible to debug otherwise.

@armona
Copy link

armona commented Jul 3, 2018

$ pipenv install --dev
Creating a virtualenv for this project…
Using /usr/local/bin/python3.6m (3.6.5) to create virtualenv…
Running virtualenv with interpreter /usr/local/bin/python3.6m
Using base prefix '/usr/local'
New python executable in /src/.cache/virtualenv/src-OMz0Or2F/bin/python3.6m
Also creating executable in /src/.cache/virtualenv/src-OMz0Or2F/bin/python
Installing setuptools, pip, wheel...done.

Virtualenv location: .cache/virtualenv/src-OMz0Or2F
Installing dependencies from Pipfile.lock (d65033)…
An error occurred while installing addict==2.1.3! Will try again.
An error occurred while installing appdirs==1.4.3! Will try again.
An error occurred while installing apscheduler==3.5.1! Will try again.
An error occurred while installing arrow==0.12.1! Will try again.
An error occurred while installing attrs==18.1.0! Will try again.
An error occurred while installing babel==2.5.3! Will try again.
An error occurred while installing boto3==1.7.35! Will try again.
An error occurred while installing cryptography==2.2.2! Will try again.
An error occurred while installing defusedxml==0.5.0! Will try again.
An error occurred while installing docutils==0.14! Will try again.
An error occurred while installing hashids==1.2.0! Will try again.
An error occurred while installing iso8601==0.1.12! Will try again.
An error occurred while installing isodate==0.6.0! Will try again.
An error occurred while installing jsl==0.2.4! Will try again.
An error occurred while installing lz4==2.0.0! Will try again.
An error occurred while installing money==1.3.0! Will try again.
An error occurred while installing psycopg2-binary==2.7.4! Will try again.
An error occurred while installing pybase64==0.4.0! Will try again.
An error occurred while installing pycrypto==2.6.1! Will try again.
An error occurred while installing pyjwt==1.6.4! Will try again.
An error occurred while installing python-rapidjson==0.6.2! Will try again.
An error occurred while installing pytz==2018.4! Will try again.
An error occurred while installing retrying==1.3.3! Will try again.
An error occurred while installing sqlalchemy==1.2.8! Will try again.
An error occurred while installing typing==3.6.4! Will try again.
An error occurred while installing uvloop==0.10.1! Will try again.
An error occurred while installing validators==0.12.2! Will try again.
An error occurred while installing atomicwrites==1.1.5! Will try again.
An error occurred while installing attrs==18.1.0! Will try again.
An error occurred while installing cached-property==1.4.2! Will try again.
An error occurred while installing callee==0.3! Will try again.
An error occurred while installing docker-compose==1.20.1! Will try again.
An error occurred while installing docker-pycreds==0.3.0! Will try again.
An error occurred while installing docopt==0.6.2! Will try again.
An error occurred while installing idna==2.6! Will try again.
An error occurred while installing mock==2.0.0! Will try again.
An error occurred while installing more-itertools==4.2.0! Will try again.
An error occurred while installing pluggy==0.6.0! Will try again.
An error occurred while installing requests-mock==1.5.0! Will try again.
An error occurred while installing websocket-client==0.48.0! Will try again.
Installing initially–failed dependencies…
Success installing addict==2.1.3!
Success installing appdirs==1.4.3!
Success installing apscheduler==3.5.1!
Success installing arrow==0.12.1!
Success installing attrs==18.1.0!
Success installing babel==2.5.3!
Success installing boto3==1.7.35!
Success installing cryptography==2.2.2!
Success installing defusedxml==0.5.0!
Success installing docutils==0.14!
Success installing hashids==1.2.0!
Success installing iso8601==0.1.12!
Success installing isodate==0.6.0!
Success installing jsl==0.2.4!
Success installing lz4==2.0.0!
Success installing money==1.3.0!
Success installing psycopg2-binary==2.7.4!
Success installing pybase64==0.4.0!
Success installing pycrypto==2.6.1!
Success installing pyjwt==1.6.4!
Success installing python-rapidjson==0.6.2!
Success installing pytz==2018.4!
Success installing retrying==1.3.3!
Success installing sqlalchemy==1.2.8!
Success installing typing==3.6.4!
Success installing uvloop==0.10.1!
Success installing validators==0.12.2!
Success installing atomicwrites==1.1.5!
Success installing attrs==18.1.0!
Success installing cached-property==1.4.2!
Success installing callee==0.3!
Success installing docker-compose==1.20.1!
Success installing docker-pycreds==0.3.0!
Success installing docopt==0.6.2!
Success installing idna==2.6!
Success installing mock==2.0.0!
Success installing more-itertools==4.2.0!
Success installing pluggy==0.6.0!
Success installing requests-mock==1.5.0!
Success installing websocket-client==0.48.0!
To activate this project's virtualenv, run the following:
 $ pipenv shell
$ pipenv graph && pipenv run python --version && pwd
addict==2.1.3
alchemy-mock==0.3.1
  - setuptools [required: Any, installed: 39.2.0]
  - six [required: Any, installed: 1.11.0]
  - sqlalchemy [required: Any, installed: 1.2.8]
APScheduler==3.5.1
  - pytz [required: Any, installed: 2018.4]
  - setuptools [required: >=0.7, installed: 39.2.0]
  - six [required: >=1.4.0, installed: 1.11.0]
  - tzlocal [required: >=1.2, installed: 1.5.1]
    - pytz [required: Any, installed: 2018.4]
arrow==0.12.1
  - python-dateutil [required: Any, installed: 2.6.1]
    - six [required: >=1.5, installed: 1.11.0]
Babel==2.5.3
  - pytz [required: >=0a, installed: 2018.4]
boto3==1.7.35
  - botocore [required: <1.11.0,>=1.10.35, installed: 1.10.35]
    - docutils [required: >=0.10, installed: 0.14]
    - jmespath [required: >=0.7.1,<1.0.0, installed: 0.9.3]
    - python-dateutil [required: <3.0.0,>=2.1, installed: 2.6.1]
      - six [required: >=1.5, installed: 1.11.0]
  - jmespath [required: >=0.7.1,<1.0.0, installed: 0.9.3]
  - s3transfer [required: <0.2.0,>=0.1.10, installed: 0.1.13]
    - botocore [required: <2.0.0,>=1.3.0, installed: 1.10.35]
      - docutils [required: >=0.10, installed: 0.14]
      - jmespath [required: >=0.7.1,<1.0.0, installed: 0.9.3]
      - python-dateutil [required: <3.0.0,>=2.1, installed: 2.6.1]
        - six [required: >=1.5, installed: 1.11.0]
callee==0.3
ciso8601==2.0.1
colorama==0.3.9
cryptography==2.2.2
  - asn1crypto [required: >=0.21.0, installed: 0.24.0]
  - cffi [required: >=1.7, installed: 1.11.5]
    - pycparser [required: Any, installed: 2.18]
  - idna [required: >=2.1, installed: 2.6]
  - six [required: >=1.4.1, installed: 1.11.0]
docker-compose==1.20.1
  - cached-property [required: >=1.2.0,<2, installed: 1.4.2]
  - docker [required: >=3.1.4,<4.0, installed: 3.3.0]
    - docker-pycreds [required: >=0.2.3, installed: 0.3.0]
      - six [required: >=1.4.0, installed: 1.11.0]
    - requests [required: !=2.18.0,>=2.14.2, installed: 2.18.4]
      - certifi [required: >=2017.4.17, installed: 2018.4.16]
      - chardet [required: <3.1.0,>=3.0.2, installed: 3.0.4]
      - idna [required: <2.7,>=2.5, installed: 2.6]
      - urllib3 [required: <1.23,>=1.21.1, installed: 1.22]
    - six [required: >=1.4.0, installed: 1.11.0]
    - websocket-client [required: >=0.32.0, installed: 0.48.0]
      - six [required: Any, installed: 1.11.0]
  - dockerpty [required: <0.5,>=0.4.1, installed: 0.4.1]
    - six [required: >=1.3.0, installed: 1.11.0]
  - docopt [required: <0.7,>=0.6.1, installed: 0.6.2]
  - jsonschema [required: >=2.5.1,<3, installed: 2.6.0]
  - PyYAML [required: <4,>=3.10, installed: 3.12]
  - requests [required: !=2.11.0,>=2.6.1,!=2.12.2,<2.19,!=2.18.0, installed: 2.18.4]
    - certifi [required: >=2017.4.17, installed: 2018.4.16]
    - chardet [required: <3.1.0,>=3.0.2, installed: 3.0.4]
    - idna [required: <2.7,>=2.5, installed: 2.6]
    - urllib3 [required: <1.23,>=1.21.1, installed: 1.22]
  - six [required: <2,>=1.3.0, installed: 1.11.0]
  - texttable [required: >=0.9.0,<0.10, installed: 0.9.1]
  - websocket-client [required: >=0.32.0,<1.0, installed: 0.48.0]
    - six [required: Any, installed: 1.11.0]
flake8==3.5.0
  - mccabe [required: <0.7.0,>=0.6.0, installed: 0.6.1]
  - pycodestyle [required: >=2.0.0,<2.4.0, installed: 2.3.1]
  - pyflakes [required: >=1.5.0,<1.7.0, installed: 1.6.0]
hashids==1.2.0
injector==0.13.4
  - setuptools [required: >=0.6b1, installed: 39.2.0]
  - typing [required: Any, installed: 3.6.4]
iso8601==0.1.12
jsl==0.2.4
lz4==2.0.0
mock==2.0.0
  - pbr [required: >=0.11, installed: 4.0.4]
  - six [required: >=1.9, installed: 1.11.0]
money==1.3.0
prometheus-client==0.2.0
psycopg2==2.7.4
psycopg2-binary==2.7.4
pybase64==0.4.0
  - six [required: >=1.10.0, installed: 1.11.0]
pycrypto==2.6.1
PyJWT==1.6.4
pytest-sugar==0.9.1
  - pytest [required: >=2.9, installed: 3.6.1]
    - atomicwrites [required: >=1.0, installed: 1.1.5]
    - attrs [required: >=17.4.0, installed: 18.1.0]
    - more-itertools [required: >=4.0.0, installed: 4.2.0]
      - six [required: <2.0.0,>=1.0.0, installed: 1.11.0]
    - pluggy [required: >=0.5,<0.7, installed: 0.6.0]
    - py [required: >=1.5.0, installed: 1.5.3]
    - setuptools [required: Any, installed: 39.2.0]
    - six [required: >=1.10.0, installed: 1.11.0]
  - termcolor [required: >=1.1.0, installed: 1.1.0]
pytest-tornado==0.4.5
  - pytest [required: Any, installed: 3.6.1]
    - atomicwrites [required: >=1.0, installed: 1.1.5]
    - attrs [required: >=17.4.0, installed: 18.1.0]
    - more-itertools [required: >=4.0.0, installed: 4.2.0]
      - six [required: <2.0.0,>=1.0.0, installed: 1.11.0]
    - pluggy [required: >=0.5,<0.7, installed: 0.6.0]
    - py [required: >=1.5.0, installed: 1.5.3]
    - setuptools [required: Any, installed: 39.2.0]
    - six [required: >=1.10.0, installed: 1.11.0]
  - tornado [required: Any, installed: 4.5.3]
python-rapidjson==0.6.2
requests-mock==1.5.0
  - requests [required: >=1.1, installed: 2.18.4]
    - certifi [required: >=2017.4.17, installed: 2018.4.16]
    - chardet [required: <3.1.0,>=3.0.2, installed: 3.0.4]
    - idna [required: <2.7,>=2.5, installed: 2.6]
    - urllib3 [required: <1.23,>=1.21.1, installed: 1.22]
  - six [required: Any, installed: 1.11.0]
retrying==1.3.3
  - six [required: >=1.7.0, installed: 1.11.0]
SQLAlchemy-Utils==0.33.3
  - six [required: Any, installed: 1.11.0]
  - SQLAlchemy [required: >=1.0, installed: 1.2.8]
structlog==18.1.0
  - six [required: Any, installed: 1.11.0]
uvloop==0.10.1
validators==0.12.2
  - decorator [required: >=3.4.0, installed: 4.3.0]
  - six [required: >=1.4.0, installed: 1.11.0]
xmltodict==0.11.0
zeep==2.5.0
  - appdirs [required: >=1.4.0, installed: 1.4.3]
  - cached-property [required: >=1.3.0, installed: 1.4.2]
  - defusedxml [required: >=0.4.1, installed: 0.5.0]
  - isodate [required: >=0.5.4, installed: 0.6.0]
    - six [required: Any, installed: 1.11.0]
  - lxml [required: >=3.0.0, installed: 4.2.1]
  - pytz [required: Any, installed: 2018.4]
  - requests [required: >=2.7.0, installed: 2.18.4]
    - certifi [required: >=2017.4.17, installed: 2018.4.16]
    - chardet [required: <3.1.0,>=3.0.2, installed: 3.0.4]
    - idna [required: <2.7,>=2.5, installed: 2.6]
    - urllib3 [required: <1.23,>=1.21.1, installed: 1.22]
  - requests-toolbelt [required: >=0.7.1, installed: 0.8.0]
    - requests [required: <3.0.0,>=2.0.1, installed: 2.18.4]
      - certifi [required: >=2017.4.17, installed: 2018.4.16]
      - chardet [required: <3.1.0,>=3.0.2, installed: 3.0.4]
      - idna [required: <2.7,>=2.5, installed: 2.6]
      - urllib3 [required: <1.23,>=1.21.1, installed: 1.22]
  - six [required: >=1.9.0, installed: 1.11.0]

Python 3.6.5

@stianlagstad
Copy link

stianlagstad commented Jul 4, 2018

We're seeing the same thing in our jenkins builds. This output is typical:

+ pipenv install -d --system
Installing dependencies from Pipfile.lock (bd3aef)...
An error occurred while installing grpcio==1.12.1! Will try again.
An error occurred while installing mypy==0.610! Will try again.
An error occurred while installing numpy==1.14.5! Will try again.
An error occurred while installing psutil==5.4.6! Will try again.
An error occurred while installing pyasn1-modules==0.2.1! Will try again.
Installing initially failed dependencies...
Success installing grpcio==1.12.1!
Success installing mypy==0.610!
Success installing numpy==1.14.5!
Success installing psutil==5.4.6!
Success installing pyasn1-modules==0.2.1!

We're using the python:3.6.5-jessie docker image as our base, and we install pipenv and dependencies like this:RUN set -ex && pip install pipenv && pipenv install --system.

EDIT: Actually, we were using python:3 in our Jenkins build. Just changed that to python:3.6.5-jessie and we see the same behaviour: Fails installs first, then retries and succeeds.

@techalchemy
Copy link
Member

techalchemy commented Jul 4, 2018

PLEASE PROVIDE CONTEXT BEFORE PASTING OUTPUT INTO AN OPEN ISSUE.

We know what the symptom looks like. It only helps us if you provide the context that can help reproduce it. Think of it like having a dog that is sick. The issue roughly says ‘my dog is vomiting, it happens when we go on walks!’ And a bunch of others now yelling ‘my dog is also vomiting!’, ‘my cat threw up once!’, ‘my turtle threw up yesterday!’. Did they each eat bad food? What food? Were they eating the same food? If I get a turtle myself, can I copy you and get mine to vomit? Was there some other factor in play?

Hopefully this analogy makes sense. Please include details about the error and not just a dump showing that the error has occurred.

@ReneGrellert
Copy link

So PLEASE tell me, what context you would like to get. Because a doctor doesn't simply stand there, waiting for the patient to tell everything without asking questions.

@techalchemy
Copy link
Member

Apologies, but it is essentially impossible for me to ask you for all of the possible variables that make your environment different from our CI and the vast majority of people who use pipenv. Are you all using exclusively private repositories? Have you tried changing anything? With any success? Between which versions of pipenv did this begin occurring? I know it seems like I should have some answers but I am completely blind to the things that make your environments unique.

@techalchemy
Copy link
Member

And unless someone can spend the time diagnosing that I probably need a way to reproduce this -- a dockerfile or something

@rdehouss
Copy link

rdehouss commented Oct 7, 2018 via email

@jeffery9876
Copy link

I have to same issue. and Pipenv detected some packages installed in the environment at the beginning, but the installation timeout.

and then Pipenv started to reinstall all the packages again.

@hjwp
Copy link

hjwp commented Nov 28, 2018

@techalchemy I have a Dockerfile which reproduces this problem, or perhaps a worse one.

https://gist.github.com/hjwp/72489330407b85d7c52d29ec77c587e0

In our case pipenv reports some failures on first install, then reports attempts to reinstall, and then actually fails to install some packages altogether (but does not report an explicit error about this)

you can verify this with

docker build -t repro .
docker run -t repro pytest  # will error bc pytest is not installed, altho it should be

@dvf
Copy link
Contributor

dvf commented Aug 19, 2019

I wanted to bump on this to see if there's been any resolution

@abe903
Copy link

abe903 commented Aug 28, 2019

pipenv install psycopg2 --sequential worked for me!

@hjwp
Copy link

hjwp commented Sep 2, 2019

everyone, i don't work on the pipenv project, but let me say on behalf of the maintainers: yes, it's useful to know when a bug affects more people. it's not useful to receive nagging comments saying "has this been fixed yet?".

if it's really bothering you, the right thing to do is fix it yourself. @nickwilliams-eventbrite, if you are bumping into this problem literally thousands of times like you say, it sounds like it would be a good investment on your part put some time into fixing it yourself, and saving your team time and frustration.

sorry for getting a bit preachy! but open source lives and dies on goodwill, and it's eroded a tiny bit at a time everyone complains with a "why hasn't this been fixed yet?" at a team of unpaid volunteers.... and if this comment rubs you up the wrong way, remember to blame me, and not the lovely pipenv team ;-)

@dwilson5
Copy link

dwilson5 commented Sep 5, 2019

Like others, I had this exact same issue. My root cause may not be the same as others, but thought I'd throw it in here to help those in a similar situation.

I'm using an old early 2011 MacBook Pro running macOS High Sierra (10.13.6).
Python version is 3.7.4.

TL;DR - My build environment was out of whack. For me, the fix was reinstalling Xcode Command Line Tools with xcode-select --install

My debugging steps:

  1. My original problem seemed to be installing regex
$ pipenv install regex
...
An error occurred while installing regex==2019.8.19 --hash=sha256:1e9f9bc44ca195baf0040b1938e6801d2f3409661c15fe57f8164c678cfc663f --hash=sha256:587b62d48ca359d2d4f02d486f1f0aa9a20fbaf23a9d4198c4bed72ab2f6c849 --hash=sha256:835ccdcdc612821edf132c20aef3eaaecfb884c9454fdc480d5887562594ac61 --hash=sha256:93f6c9da57e704e128d90736430c5c59dd733327882b371b0cae8833106c2a21 --hash=sha256:a46f27d267665016acb3ec8c6046ec5eae8cf80befe85ba47f43c6f5ec636dcd --hash=sha256:c5c8999b3a341b21ac2c6ec704cfcccbc50f1fedd61b6a8ee915ca7fd4b0a557 --hash=sha256:d4d1829cf97632673aa49f378b0a2c3925acd795148c5ace8ef854217abbee89 --hash=sha256:d96479257e8e4d1d7800adb26bf9c5ca5bab1648a1eddcac84d107b73dc68327 --hash=sha256:f20f4912daf443220436759858f96fefbfc6c6ba9e67835fd6e4e9b73582791a --hash=sha256:f2b37b5b2c2a9d56d9e88efef200ec09c36c7f323f9d58d0b985a90923df386d --hash=sha256:fe765b809a1f7ce642c2edeee351e7ebd84391640031ba4b60af8d91a9045890! 
...
  1. I ran pipenv with -v (verbose) and noticed the following lines showing an actual build error while attempting to build a bdist_wheel package:
$ pipenv install -v regex
...
  Running command /Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex/setup.py'"'"'; __file__='"'"'/private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-wheel-42ajnw_w --python-tag cp37
  BASE_DIR is /private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex
  /Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/lib/python3.7/site-packages/setuptools/dist.py:474: UserWarning: Normalizing '2019.08.19' to '2019.8.19'
    normalized_version,
  running bdist_wheel
  running build
  running build_py
  creating build
  creating build/lib.macosx-10.11-x86_64-3.7
  creating build/lib.macosx-10.11-x86_64-3.7/regex
  copying regex_3/regex/__init__.py -> build/lib.macosx-10.11-x86_64-3.7/regex
  copying regex_3/regex/regex.py -> build/lib.macosx-10.11-x86_64-3.7/regex
  copying regex_3/regex/_regex_core.py -> build/lib.macosx-10.11-x86_64-3.7/regex
  creating build/lib.macosx-10.11-x86_64-3.7/regex/test
  copying regex_3/regex/test/__init__.py -> build/lib.macosx-10.11-x86_64-3.7/regex/test
  copying regex_3/regex/test/test_regex.py -> build/lib.macosx-10.11-x86_64-3.7/regex/test
  warning: build_py: byte-compiling is disabled, skipping.

  running build_ext
  building 'regex._regex' extension
  creating build/temp.macosx-10.11-x86_64-3.7
  creating build/temp.macosx-10.11-x86_64-3.7/regex_3
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c regex_3/_regex.c -o build/temp.macosx-10.11-x86_64-3.7/regex_3/_regex.o
  xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
  error: command 'clang' failed with exit status 1
  Building wheel for regex (setup.py): finished with status 'error'
  ERROR: Failed building wheel for regex
  Running setup.py clean for regex
  Running command /Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex/setup.py'"'"'; __file__='"'"'/private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' clean --all
  BASE_DIR is /private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex
  /Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/lib/python3.7/site-packages/setuptools/dist.py:474: UserWarning: Normalizing '2019.08.19' to '2019.8.19'
    normalized_version,
  running clean
  removing 'build/temp.macosx-10.11-x86_64-3.7' (and everything under it)
  removing 'build/lib.macosx-10.11-x86_64-3.7' (and everything under it)
  'build/bdist.macosx-10.11-x86_64' does not exist -- can't clean it
  'build/scripts-3.7' does not exist -- can't clean it
  removing 'build'
Failed to build regex
Installing collected packages: regex
  Created temporary directory: /private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-record-u8h1g1mx
  Running setup.py install for regex: started
    Running command /Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex/setup.py'"'"'; __file__='"'"'/private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-record-u8h1g1mx/install-record.txt --single-version-externally-managed --compile --install-headers /Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/bin/../include/site/python3.7/regex
    BASE_DIR is /private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex
    /Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/lib/python3.7/site-packages/setuptools/dist.py:474: UserWarning: Normalizing '2019.08.19' to '2019.8.19'
      normalized_version,
    running install
    running build
    running build_py
    creating build
    creating build/lib.macosx-10.11-x86_64-3.7
    creating build/lib.macosx-10.11-x86_64-3.7/regex
    copying regex_3/regex/__init__.py -> build/lib.macosx-10.11-x86_64-3.7/regex
    copying regex_3/regex/regex.py -> build/lib.macosx-10.11-x86_64-3.7/regex
    copying regex_3/regex/_regex_core.py -> build/lib.macosx-10.11-x86_64-3.7/regex
    creating build/lib.macosx-10.11-x86_64-3.7/regex/test
    copying regex_3/regex/test/__init__.py -> build/lib.macosx-10.11-x86_64-3.7/regex/test
    copying regex_3/regex/test/test_regex.py -> build/lib.macosx-10.11-x86_64-3.7/regex/test
    warning: build_py: byte-compiling is disabled, skipping.

    running build_ext
    building 'regex._regex' extension
    creating build/temp.macosx-10.11-x86_64-3.7
    creating build/temp.macosx-10.11-x86_64-3.7/regex_3
    clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c regex_3/_regex.c -o build/temp.macosx-10.11-x86_64-3.7/regex_3/_regex.o
    xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun
    error: command 'clang' failed with exit status 1
  Running setup.py install for regex: finished with status 'error'
Cleaning up...
  Removing source in /private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex
Removed build tracker '/private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-req-tracker-68pwd4_a'
ERROR: Command errored out with exit status 1: /Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex/setup.py'"'"'; __file__='"'"'/private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-record-u8h1g1mx/install-record.txt --single-version-externally-managed --compile --install-headers /Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/bin/../include/site/python3.7/regex Check the logs for full command output.
Exception information:
Traceback (most recent call last):
  File "/Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/lib/python3.7/site-packages/pip/_internal/cli/base_command.py", line 188, in main
    status = self.run(options, args)
  File "/Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/lib/python3.7/site-packages/pip/_internal/commands/install.py", line 407, in run
    use_user_site=options.use_user_site,
  File "/Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/lib/python3.7/site-packages/pip/_internal/req/__init__.py", line 58, in install_given_reqs
    **kwargs
  File "/Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/lib/python3.7/site-packages/pip/_internal/req/req_install.py", line 959, in install
    spinner=spinner,
  File "/Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/lib/python3.7/site-packages/pip/_internal/utils/misc.py", line 931, in call_subprocess
    raise InstallationError(exc_msg)
pip._internal.exceptions.InstallationError: Command errored out with exit status 1: /Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/bin/python3.7 -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex/setup.py'"'"'; __file__='"'"'/private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-install-isftptee/regex/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /private/var/folders/74/nn92mwzn5p178mjyphzwhs6h0000gp/T/pip-record-u8h1g1mx/install-record.txt --single-version-externally-managed --compile --install-headers /Users/<user>/.local/share/virtualenvs/penv-EwluS9kv/bin/../include/site/python3.7/regex Check the logs for full command output.

In particular, this line stuck out:
xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/CommandLineTools/usr/bin/xcrun

  1. It turns out that I had no bin directory at all in the above path. A quick Google search revealed links such as this one https://apple.stackexchange.com/questions/321858/xcrun-missing-installing-xcode-command-line-tools-not-fixing-issue, which others basically attribute to a bad install of Xcode Command Line Tools.

  2. After reading more from above, I realized I'd recently upgraded from an older version of macOS. When I did this, my Xcode Command Line Tools installation was no longer valid. Following the advice found in the above forum, I installed the appropriate CLT with xcode-select --install. After that, everything started working immediately.

For me, this issue would've only been triggered by packages which have to be compiled.

This may or may not be similar to what others are experiencing. If so, maybe more verbose warning / error messaging from pipenv could alert the user to the root cause.

Hope this helps others.

@mcallaghan-bsm
Copy link

Same issue here (I believe). Offering some additional context/information.

(initially confounded with moto getmoto/moto#2465).
It does feel like a concurrency problem (see that ticket for details and experiments that prove it).

Ultimately I could reasonably consistently reproduce with something like:

Pipfile

[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
"boto3" = ""
mygeotab = "
"
mysql-connector-python = ""
pyodbc = "
"
requests = ""
xlrd = "
"

[dev-packages]
freezegun = ""
metrics = "
"
moto = ""
pyfakefs = "
"
pylint = ""
pytest = "
"
pytest-cov = ""
pytest-mock = "
"
pytest-sugar = ""
pytz = "
"
sqlparse = "*"

[requires]
python_version = "3.7"

And the docker run command:

docker run --volume="$PWD":/app -it python:3-slim bash -c "pip3 install --upgrade pip; pip3 install pipenv; cd /app; apt-get update && apt-get install --yes awscli bc bsdmainutils curl freetds-dev g++ gcc git jq sshpass tdsodbc openssh-client rsync unixodbc-dev zip; pipenv sync --bare --three; pipenv install --skip-lock --dev"

(SNIP all the pre-setup & apt stuff)

Creating a virtualenv for this project…
Pipfile: /app/Pipfile
Using /usr/local/bin/python (3.7.3) to create virtualenv…
⠹ Creating virtual environment...Already using interpreter /usr/local/bin/python
Using base prefix '/usr/local'
New python executable in /root/.local/share/virtualenvs/app-4PlAip0Q/bin/python
Installing setuptools, pip, wheel...
done.

✔ Successfully created virtual environment! 
Virtualenv location: /root/.local/share/virtualenvs/app-4PlAip0Q
Installing dependencies from Pipfile.lock (63414b)…
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 26/26 — 00:00:31
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.
Installing dependencies from Pipfile…
An error occurred while installing metrics! Will try again.
An error occurred while installing moto! Will try again.
An error occurred while installing pylint! Will try again.
An error occurred while installing pytest-cov! Will try again.
An error occurred while installing pytest-mock! Will try again.
An error occurred while installing pytest-sugar! Will try again.
  🐍   ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 17/17 — 00:00:54
Installing initially failed dependencies…
  ☤  ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 6/6 — 00:00:58
To activate this project's virtualenv, run pipenv shell.
Alternatively, run a command inside the virtualenv with pipenv run.

@a-eid
Copy link

a-eid commented Jan 9, 2020

Screen Shot 2020-01-10 at 00 46 06

seems to be related...

@Shivam2125
Copy link

While installing the below lxml I am getting this error.
pipenv install lxml

ERROR: Exception:
Traceback (most recent call last):
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_vendor\urllib3\response.py", line 425, in _error_catcher
yield
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_vendor\urllib3\response.py", line 507, in read
data = self._fp.read(amt) if not fp_closed else b""
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_vendor\cachecontrol\filewrapper.py", line 62, in read
data = self.__fp.read(amt)
File "c:\users\shivam\appdata\local\programs\python\python38-32\lib\http\client.py", line 458, in read
n = self.readinto(b)
File "c:\users\shivam\appdata\local\programs\python\python38-32\lib\http\client.py", line 502, in readinto
n = self.fp.readinto(b)
File "c:\users\shivam\appdata\local\programs\python\python38-32\lib\socket.py", line 669, in readinto
return self._sock.recv_into(b)
File "c:\users\shivam\appdata\local\programs\python\python38-32\lib\ssl.py", line 1241, in recv_into
return self.read(nbytes, buffer)
File "c:\users\shivam\appdata\local\programs\python\python38-32\lib\ssl.py", line 1099, in read
return self._sslobj.read(len, buffer)
socket.timeout: The read operation timed out

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_internal\cli\base_command.py", line 188, in _main
status = self.run(options, args)
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_internal\cli\req_command.py", line 185, in wrapper
return func(self, options, args)
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_internal\commands\install.py", line 332, in run
requirement_set = resolver.resolve(
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_internal\resolution\legacy\resolver.py", line 179, in resolve
discovered_reqs.extend(self._resolve_one(requirement_set, req))
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_internal\resolution\legacy\resolver.py", line 362, in _resolve_one
abstract_dist = self._get_abstract_dist_for(req_to_install)
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_internal\resolution\legacy\resolver.py", line 314, in _get_abstract_dist_for
abstract_dist = self.preparer.prepare_linked_requirement(req)
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_internal\operations\prepare.py", line 467, in prepare_linked_requirement
local_file = unpack_url(
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_internal\operations\prepare.py", line 255, in unpack_url
file = get_http_url(
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_internal\operations\prepare.py", line 129, in get_http_url
from_path, content_type = _download_http_url(
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_internal\operations\prepare.py", line 281, in _download_http_url
for chunk in download.chunks:
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_internal\cli\progress_bars.py", line 166, in iter
for x in it:
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_internal\network\utils.py", line 15, in response_chunks
for chunk in response.raw.stream(
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_vendor\urllib3\response.py", line 564, in stream
data = self.read(amt=amt, decode_content=decode_content)
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_vendor\urllib3\response.py", line 529, in read
raise IncompleteRead(self._fp_bytes_read, self.length_remaining)
File "c:\users\shivam\appdata\local\programs\python\python38-32\lib\contextlib.py", line 131, in exit
self.gen.throw(type, value, traceback)
File "C:\Users\Shivam.virtualenvs\Projects-Muah_USQ\lib\site-packages\pip_vendor\urllib3\response.py", line 430, in _error_catcher
raise ReadTimeoutError(self._pool, None, "Read timed out.")
pip._vendor.urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='files.pythonhosted.org', port=443): Read timed out.

@WalkOnMars
Copy link

image
I have the same issue ,how did you guys solve it?
Any help would be appreciate。

@WalkOnMars
Copy link

@WalkOnMars

image
I have the same issue ,how did you guys solve it?
Any help would be appreciate。

I have solve this issue by assign specific python version like below:
image

before I modify it , It was 3.7
my python version is 3.7.4, you can modify it base on your python version.

@theDreamer911
Copy link

if you still got the error please try using this

python3 -m ensurepip --upgrade
or
py -m ensurepip --upgrade

It will upgrade the pip, and also fix my problem

@artctv
Copy link

artctv commented Mar 16, 2021

pipenv shell and then pip install --upgrade setuptools (for python 3.7.4) solved for me

@zStupan
Copy link

zStupan commented Apr 24, 2021

I had the same issue.
Deleting the pipenv cache directory solved it for me (https://pipenv.pypa.io/en/latest/diagnose/#your-dependencies-could-not-be-resolved)

@prensoni0143
Copy link

GH5:cloud-comer i5$ pip install --upgrade setuptools
/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/OpenSSL/crypto.py:12: CryptographyDeprecationWarning: Python 2 is no longer supported by the Python core team. Support for it is now deprecated in cryptography, and will be removed in the next release.
from cryptography import x509
Collecting setuptools
Using cached https://files.pythonhosted.org/packages/e1/b7/182161210a13158cd3ccc41ee19aadef54496b74f2817cc147006ec932b4/setuptools-44.1.1-py2.py3-none-any.whl
Installing collected packages: setuptools
Found existing installation: setuptools 41.0.1
Uninstalling setuptools-41.0.1:
Could not install packages due to an EnvironmentError: [Errno 1] Operation not permitted: '/private/var/folders/sw/8d0w0rtj4_v81v6g586q74fm0000gn/T/pip-uninstall-cQKNTb/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/easy_install.py'

By the way, I thought I am running Python 3

$ python

WARNING: Python 2.7 is not recommended.
This version is included in macOS for compatibility with legacy software.
Future versions of macOS will not include Python 2.7.
Instead, it is recommended that you transition to using 'python3' from within Terminal.

Python 2.7.16 (default, May 8 2021, 11:48:02)
[GCC Apple LLVM 12.0.5 (clang-1205.0.19.59.6) [+internal-os, ptrauth-isa=deploy on darwin
Type "help", "copyright", "credits" or "license" for more information.

@Jayesh-ux
Copy link

Same i am getting error installating all of my package
alembic==1.4.2
appdirs==1.4.4
asgiref==3.2.10
Babel==2.8.0
bcrypt==3.1.7
blinker==1.4
buildozer==1.2.0
cffi==1.14.0
click==7.1.2
cryptography==2.9.2
distlib==0.3.0
dj-database-url==0.5.0
Django==3.0.8
django-crispy-forms==1.9.2
django-heroku==0.3.1
django-mathfilters==1.0.0
dnspython==1.16.0
email-validator==1.1.1
filelock==3.0.12
Flask==1.0.2
Flask-BabelEx==0.9.4
Flask-Compress==1.4.0
Flask-Gravatar==0.5.0
Flask-Login==0.4.1
Flask-Mail==0.9.1
Flask-Migrate==2.4.0
Flask-Paranoid==0.2.0
Flask-Principal==0.4.0
Flask-Security-Too==3.4.3
Flask-SQLAlchemy==2.4.1
Flask-WTF==0.14.3
gunicorn==20.0.4
idna==2.10
itsdangerous==1.1.0
Jinja2==2.11.2
ldap3==2.7
Mako==1.1.3
MarkupSafe==1.1.1
paramiko==2.7.1
passlib==1.7.2
pexpect==4.8.0
pgadmin4==4.23
Pillow==7.2.0
psutil==5.7.0
psycopg2==2.8.5
psycopg2-binary==2.8.5
ptyprocess==0.6.0
pyasn1==0.4.8
pycparser==2.20
PyNaCl==1.4.0
python-dateutil==2.8.1
python-editor==1.0.4
pytz==2018.9
sh==1.13.1
simplejson==3.16.0
six==1.15.0
speaklater==1.3
SQLAlchemy==1.3.18
sqlparse==0.2.4
sshtunnel==0.1.5
virtualenv==20.0.23
Werkzeug==1.0.1
whitenoise==5.1.0
WTForms==2.2.1

@matteius
Copy link
Member

matteius commented Jan 9, 2022

Closing this issue as it was reported for much older versions of pipenv and I could not reproduce it with the examples given and the current version of pipenv; if you think there is still an issue related to this with 2022.1.8 and that it is not already covered in one of the existing (more recent) Issue reports, feel free to open a new issue with description following the template and provide a reproducible example that affects latest version. Thanks!

@matteius matteius closed this as completed Jan 9, 2022
@TurboCoder13
Copy link

I had a similar issue today with installing dependencies from a pipfile in my organisation. It may or may not be the exact same problem everyone had in this thread, but I figured it could be of some use to some of you. :)

pipfile contents:

[[source]]
name = "abc"
url = "nexus url"
verify_ssl = true

[[source]]
name = "pypi"
url = "https://pypi.org/simple"
verify_ssl = true

[dev-packages]

[packages]
lxml = "*"
local_folder_1 = {extras = ["postgres"], version = "~=6.3.0"}
local_folder_2 = {editable = true, path = "path_1"}
pika = "*"
pyhamcrest = "*"
pylint = "*"
requests = "*"
zeep = "*"
aiohttp = "*"
psycopg2-binary = "*"

[requires]
python_version = "3.8"

When running pipenv install command from the dir where the pipfile was located, I was getting this error:

An error occurred while installing <requirement>

Then finally it shows this at the end:

Package installation failed...

My issue was a little more obvious though, since I had this output (shortened output):

[pipenv.exceptions.InstallError]: Collecting psycopg2-binary==2.9.3
[pipenv.exceptions.InstallError]: Error: pg_config executable not found.

So all I did was run pipenv install psycopg2-binary and then it installed psycopg2-binary as well as the packages in the pipfile.

@remy-niles
Copy link

remy-niles commented Nov 2, 2022

I have found that this problem can also present itself if you made changes to your dependencies in your Pipfile but forgot to "lock" those changes to update the Pipfile.lock file accordingly (behaviour tested and observed in 2022.9.24, 2022.10.4, and 2022.10.25). In our specific situation, we had an internal package from an internal repo using PyPi as an upstream whose dependency declaration had been updated to a higher version in the Pipfile, but the lockfile (Pipfile.lock) still specified an older version. When running "pipenv sync" in our CI pipeline, whatever issue having this discrepancy caused prevented it from succeeding. Once we updated the lockfile accordingly and pushed the change, it resolved the issue. Hope it helps.

@Aym3nTN
Copy link

Aym3nTN commented Dec 14, 2022

This stackoverflow response seems to solve the issue.. it did for me!

@lwmonster
Copy link

lwmonster commented Feb 8, 2023

Installing mysqlclient...
⠧ Installing mysqlclient...[31m[1mError: [0m An error occurred while installing [32mmysqlclient[0m!
Error text: Collecting mysqlclient
Using cached mysqlclient-2.1.1.tar.gz (88 kB)
Preparing metadata (setup.py): started
Preparing metadata (setup.py): finished with status 'done'
Building wheels for collected packages: mysqlclient
Building wheel for mysqlclient (setup.py): started
Building wheel for mysqlclient (setup.py): finished with status 'error'
Running setup.py clean for mysqlclient
Failed to build mysqlclient
Installing collected packages: mysqlclient
Running setup.py install for mysqlclient: started
Running setup.py install for mysqlclient: finished with status 'error'

[36m error: subprocess-exited-with-error

× python setup.py bdist_wheel did not run successfully.
│ exit code: 1
╰─> [46 lines of output]
mysql_config --version
['8.0.32']
mysql_config --libs
['-L/usr/local/mysql/lib', '-lmysqlclient', '-lssl', '-lcrypto', '-lresolv']
mysql_config --cflags
['-I/usr/local/mysql/include']
ext_options:
library_dirs: ['/usr/local/mysql/lib']
libraries: ['mysqlclient', 'resolv']
extra_compile_args: ['-std=c99']
extra_link_args: []
include_dirs: ['/usr/local/mysql/include']
extra_objects: []
define_macros: [('version_info', "(2,1,1,'final',0)"), ('version', '2.1.1')]
running bdist_wheel
running build
running build_py
creating build
creating build/lib.macosx-10.9-universal2-cpython-39
creating build/lib.macosx-10.9-universal2-cpython-39/MySQLdb
copying MySQLdb/init.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb
copying MySQLdb/_exceptions.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb
copying MySQLdb/connections.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb
copying MySQLdb/converters.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb
copying MySQLdb/cursors.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb
copying MySQLdb/release.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb
copying MySQLdb/times.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb
creating build/lib.macosx-10.9-universal2-cpython-39/MySQLdb/constants
copying MySQLdb/constants/init.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb/constants
copying MySQLdb/constants/CLIENT.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb/constants
copying MySQLdb/constants/CR.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb/constants
copying MySQLdb/constants/ER.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb/constants
copying MySQLdb/constants/FIELD_TYPE.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb/constants
copying MySQLdb/constants/FLAG.py -> build/lib.macosx-10.9-universal2-cpython-39/MySQLdb/constants
warning: build_py: byte-compiling is disabled, skipping.

  running build_ext
  building 'MySQLdb._mysql' extension
  creating build/temp.macosx-10.9-universal2-cpython-39
  creating build/temp.macosx-10.9-universal2-cpython-39/MySQLdb
  clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders
-iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -arch arm64 -arch x86_64 -Werror=implicit-function-declaration
-Dversion_info=(2,1,1,'final',0) -D__version__=2.1.1 -I/usr/local/mysql/include -I/Users/ppdady/.local/share/virtualenvs/django-projects-sx1FCRrR/include
-I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.9/Headers -c MySQLdb/_mysql.c -o build/temp.macosx-10.9-universal2-cpython-39/MySQLdb/_mysql.o -std=c99
MySQLdb/_mysql.c:46:10: fatal error: 'Python.h' file not found
#include "Python.h"
^~~~~~~~~~
1 error generated.
error: command '/usr/bin/clang' failed with exit code 1

note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for mysqlclient
error: subprocess-exited-with-error

This works for me:

pipenv shell 

pip3 install --upgrade setuptools

sanjacob added a commit to sanjacob/BlackboardSync that referenced this issue May 26, 2023
@Tlaloc-Es
Copy link

The same here I tried to delete Pipfile.lock, upgrade pipenv and setuptools but nothing.

@brf153
Copy link

brf153 commented Aug 6, 2023

Hey there,
I was facing the same issue. I deleted the Pipfile and started installing all the packages again. This time when I was installing flask-sqlachemy I got the error

Resolving flask-sqlachemy...
Adding flask-sqlachemy to Pipfile's [packages] ...
✔ Installation Succeeded
Pipfile.lock (81f117) out of date, updating to (7e9569)...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
Resolving dependencies...
✘ Locking Failed!
⠸ Locking...
CRITICAL:pipenv.patched.pip._internal.resolution.resolvelib.factory:Could not find a version that satisfies the requirement flask-sqlachemy (from versions: none)
[ResolutionFailure]:   File "/usr/local/lib/python3.10/dist-packages/pipenv/resolver.py", line 704, in _main
[ResolutionFailure]:       resolve_packages(
[ResolutionFailure]:   File "/usr/local/lib/python3.10/dist-packages/pipenv/resolver.py", line 662, in resolve_packages
[ResolutionFailure]:       results, resolver = resolve(
[ResolutionFailure]:   File "/usr/local/lib/python3.10/dist-packages/pipenv/resolver.py", line 642, in resolve
[ResolutionFailure]:       return resolve_deps(
[ResolutionFailure]:   File "/usr/local/lib/python3.10/dist-packages/pipenv/utils/resolver.py", line 1167, in resolve_deps
[ResolutionFailure]:       results, hashes, markers_lookup, resolver, skipped = actually_resolve_deps(
[ResolutionFailure]:   File "/usr/local/lib/python3.10/dist-packages/pipenv/utils/resolver.py", line 948, in actually_resolve_deps
[ResolutionFailure]:       resolver.resolve()
[ResolutionFailure]:   File "/usr/local/lib/python3.10/dist-packages/pipenv/utils/resolver.py", line 690, in resolve
[ResolutionFailure]:       raise ResolutionFailure(message=str(e))
[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
  You can use $ pipenv run pip install <requirement_name> to bypass this mechanism, then run $ pipenv graph to inspect the versions actually installed in the virtualenv.
  Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: No matching distribution found for flask-sqlachemy

Clearly, there is some mismatch in the version of the dependencies. So, I would recommend deleting the Pipfile and reinstalling the packages again. To be precise, I have Python version (3.10), pip version (22.0.2), and pipenv version 2023.7.23 .

@nExmond
Copy link

nExmond commented Aug 21, 2023

In my case, removing the extra Python version from my system, resetting the environment path, and reinstalling it fixed the problem.

@Kotsuha
Copy link

Kotsuha commented Nov 15, 2023

In my case, after running pipenv lock --clear I ran pipenv install and then it works.

@SalahEddine03
Copy link

Hey Since you're seeing warnings about invalid metadata entries for the Click package, it's a good idea to try updating or reinstalling it. You can do this using pip: "pip install --upgrade click"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug 🐛 This issue is a bug.
Projects
None yet
Development

No branches or pull requests