I'm getting regular occurrences where sub-dependencies of packages are not being installed and the error "Could not find a version that matches" - even for a simple test case of e.g. one package e.g. requests. I'm on a Mac, High Sierra, pipenv, version 11.6.1, Python 3 via brew.
I've had better success with pipenv on another machine, so am excited about what it does - but I do get irregular results and am also finding that different versions of pipenv seem to be coming down depending on whether I use brew to install pipenv, or use pip to install pipenv - and on top of that pipenv seems to be evolving a lot. Anway, let's consider python3 with pipenv installed via pip3 today.
I'll uninstall all my brew Pythons so that we start from the beginning:
brew uninstall python3
brew uninstall python2
brew install python3
pip3 install pipenv
then let's test out pipenv with the most simple situation
mkdir proj1
cd proj1
pipenv install requests
$ pipenv graph
requests==2.18.4
- certifi [required: >=2017.4.17, installed: 2018.1.18]
- chardet [required: <3.1.0,>=3.0.2, installed: 3.0.4]
- idna [required: >=2.5,<2.7, installed: 2.6]
- urllib3 [required: >=1.21.1,<1.23, installed: 1.22]
Ok so far. But no Pipfile.lock was created for some reason.
And look what happens when I remove the virtual environment and recreate it.
pipenv --rm
pipenv install
pipenv graph
requests==2.18.4
- certifi [required: >=2017.4.17, installed: ?]
- chardet [required: >=3.0.2,<3.1.0, installed: ?]
- idna [required: >=2.5,<2.7, installed: ?]
- urllib3 [required: >=1.21.1,<1.23, installed: ?]
The sub-dependencies have ? marks and have not been installed. I get this a lot. See my comments to #1580.
The other thing I get a lot of is "Could not find a version that matches" errors. And of pipenv asking me to use the --skip-lock option. Even when my Pipfile contains a single reference to 'requests' ?!
pipenv update
Running $ pipenv lock then $ pipenv sync.
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Could not find a version that matches requests
Tried: (no version found at all)
$ pipenv install --skip-lock
Installing dependencies from Pipfile…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:03
To activate this project's virtualenv, run the following:
$ pipenv shell
Andys-MacBook-Air:proj1 Andy$ pipenv graph
requests==2.18.4
- certifi [required: >=2017.4.17, installed: 2018.1.18]
- chardet [required: >=3.0.2,<3.1.0, installed: 3.0.4]
- idna [required: <2.7,>=2.5, installed: 2.6]
- urllib3 [required: <1.23,>=1.21.1, installed: 1.22]
$ pipenv lock
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Updated Pipfile.lock (7b8df8)!
So I've managed to get the Pipfile.lock created. So let's remove the virtual environment and recreate it. My understanding is that pipenv should create the virtual environment and install what has been specified in the Pipfile.lock
Andys-MacBook-Air:proj1 Andy$ pipenv --rm
Removing virtualenv (/Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E)…
Andys-MacBook-Air:proj1 Andy$ pipenv install
Creating a virtualenv for this project…
Using /usr/local/bin/python3.6m (3.6.4) to create virtualenv…
⠋Running virtualenv with interpreter /usr/local/bin/python3.6m
Using base prefix '/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E/bin/python3.6
Also creating executable in /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E
Installing dependencies from Pipfile.lock (7b8df8)…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:01
To activate this project's virtualenv, run the following:
$ pipenv shell
Andys-MacBook-Air:proj1 Andy$ pipenv graph
requests==2.18.4
- certifi [required: >=2017.4.17, installed: ?]
- chardet [required: <3.1.0,>=3.0.2, installed: ?]
- idna [required: >=2.5,<2.7, installed: ?]
- urllib3 [required: <1.23,>=1.21.1, installed: ?]
Missing sub-dependencies again.
Diagnostic info python3 -m pipenv.help
Pipenv version: `'11.6.1'`
Pipenv location: `'/usr/local/lib/python3.6/site-packages/pipenv'`
Python location: `'/usr/local/opt/python/bin/python3.6'`
Other Python installations in `PATH`:
- `2.7`: `/usr/bin/python2.7`
- `2.7`: `/usr/bin/python2.7`
- `3.6`: `/usr/local/bin/python3.6m`
- `3.6`: `/usr/local/bin/python3.6`
- `3.6`: `/usr/local/bin/python3.6`
- `2.7.10`: `/usr/bin/python`
- `3.6.4`: `/usr/local/bin/python3`
- `3.6.4`: `/usr/local/bin/python3`
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.4',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '17.4.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST '
'2017; root:xnu-4570.41.2~1/RELEASE_X86_64',
'python_full_version': '3.6.4',
'python_version': '3.6',
'sys_platform': 'darwin'}
System environment variables:
- `TERM_PROGRAM`
- `TERM`
- `SHELL`
- `TMPDIR`
- `PERL5LIB`
- `Apple_PubSub_Socket_Render`
- `TERM_PROGRAM_VERSION`
- `OLDPWD`
- `PERL_MB_OPT`
- `TERM_SESSION_ID`
- `USER`
- `SSH_AUTH_SOCK`
- `PATH`
- `ENV_ROLE`
- `PLANTUML_JAR`
- `PWD`
- `JAVA_HOME`
- `LANG`
- `GRAPHVIZ_DOT`
- `XPC_FLAGS`
- `XPC_SERVICE_NAME`
- `HOME`
- `SHLVL`
- `PERL_LOCAL_LIB_ROOT`
- `SLIMERJSLAUNCHER`
- `LOGNAME`
- `ARCHFLAGS`
- `DISPLAY`
- `PERL_MM_OPT`
- `_`
- `__CF_USER_TEXT_ENCODING`
- `PIP_PYTHON_PATH`
- `PYTHONUNBUFFERED`
Pipenv–specific environment variables:
Debug–specific environment variables:
- `PATH`: `/Users/Andy/perl5/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/opt/X11/bin:/Library/PostgreSQL/9.5/bin:/Users/Andy/scripts`
- `SHELL`: `/bin/bash`
- `LANG`: `en_AU.UTF-8`
- `PWD`: `/Users/Andy/Devel/test_pipenv/proj1`
---------------------------
Contents of `Pipfile` ('/Users/Andy/Devel/test_pipenv/proj1/Pipfile'):
```toml
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
requests = "*"
[dev-packages]
[requires]
python_version = "3.6"
Contents of Pipfile.lock
('/Users/Andy/Devel/test_pipenv/proj1/Pipfile.lock'):
{
"_meta": {
"hash": {
"sha256": "33a0ec7c8e3bae6f62dd618f847de92ece20e2bd4efb496927e2524b9c7b8df8"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.6"
},
"sources": [
{
"name": "pypi",
"url": "https://pypi.python.org/simple",
"verify_ssl": true
}
]
},
"default": {
"requests": {
"hashes": [
"sha256:6a1b267aa90cac58ac3a765d067950e7dbbf75b1da07e895d1f594193a40a38b",
"sha256:9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e"
],
"version": "==2.18.4"
}
},
"develop": {}
}
Further info. Running pipenv update with the verbose option shows that the Finding secondary dependencies
stage is coming up blank, which may explain why sub dependencies aren't being hunted down. I've seen this many times on two different machines.
``
Andys-MacBook-Air:proj1 Andy$ pipenv update -v
Running $ pipenv lock then $ pipenv sync.
Locking [dev-packages] dependencies…
Using pip: -i https://pypi.python.org/simple
ROUND 1
Current constraints:
Finding the best candidates:
Result of round 1: stable, done
Locking [packages] dependencies…
Using pip: -i https://pypi.python.org/simple
ROUND 1
Current constraints:
requests
Finding the best candidates:
found candidate requests==2.18.4 (constraint was
Finding secondary dependencies:
Result of round 1: stable, done
Warning: Error generating hash for requests
Updated Pipfile.lock (7b8df8)!
Installing dependencies from Pipfile.lock (7b8df8)…
Installing 'requests==2.18.4 --hash=sha256:6a1b267aa90cac58ac3a765d067950e7dbbf75b1da07e895d1f594193a40a38b --hash=sha256:9c443e7324ba5b85070c4a818ade28bfabedf16ea10206da1132edaa6dda237e'
$ "/Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E/bin/pip" install --verbose --no-deps -r /var/folders/8h/n6qvp62x7pz1gx3d2sc2h8sh0000gn/T/pipenv-0u2uamr1-requirements/pipenv-gq6iz1m9-requirement.txt --require-hashes -i https://pypi.python.org/simple --exists-action w
Requirement already satisfied: requests==2.18.4 in /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E/lib/python3.6/site-packages (from -r /var/folders/8h/n6qvp62x7pz1gx3d2sc2h8sh0000gn/T/pipenv-0u2uamr1-requirements/pipenv-gq6iz1m9-requirement.txt (line 1))
Since it is already installed, we are trusting this package without checking its hash. To ensure a completely repeatable environment, install into an empty virtualenv.
Cleaning up...
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:00
To activate this project's virtualenv, run the following:
$ pipenv shell
All dependencies are now up-to-date!
Andys-MacBook-Air:proj1 Andy$ pipenv graph
requests==2.18.4
So I just tried the above commands in a brand new Mac Vmware Sierra guest environment (Mac inside a Mac), clean and fresh - pipenv behaves OK and as expected.
I did get one "Warning: Your dependencies could not be resolved." message for no apparent reason that eventually went away - so its not perfect.
So I've seen these errors on three machines, but one virgin mac machine is almost free of problems, whilst the other two have similar issues - one much worse (see this issue) than the other.
pipenv
relies on that is flaky? brew
environment and recreate it? pip3 install pipenv
? brew is out of date at the moment — they're lagging in our release cycle.
actually they seem to have caught up
Is there something that pipenv relies on that is flaky?
Everything is intended to be as deterministic as possible. There are a lot of factors involved — ranging from your local pip cache, to the pipenv cache, to the lockfile needing to be re-created, to the availability of PyPI (etc), to installation differences, etc.
Should I uninstall my whole brew environment and recreate it?
No — I'd just either 'brew install pipenv' or 'pip3 install pipenv'.
Should I be using a specific stable version of pipenv rather than whatever becomes available via pip3 install pipenv?
Each release is intended to be more stable than the last. That's the goal :)
What would cause pipenv to decide that secondary dependencies are blank?
This shouldn't be happening. Ensure you're using the latest version.
What would cause dependencies could not be resolved/Could not find a version that matches" errors?
Mis-matching dependencies — one thing requires requests==2, another <2.
What would cause Pipfile.lock files to sometimes not get created?
That sounds like a legitimate bug, unless an error was raised.
this will give us a lot of insight into your configuration and might shed light into any specific issues you're having.
@kennethreitz I have similar trouble.
My $ python -m pipenv.help
is:
Pipenv version: '11.6.1'
Pipenv location: '/Users/vikkyshostak/.local/share/virtualenvs/django_visatorus-fiOUaYzG/lib/python3.6/site-packages/pipenv'
Python location: '/Users/vikkyshostak/.local/share/virtualenvs/django_visatorus-fiOUaYzG/bin/python3'
Other Python installations in PATH
:
2.7
: /usr/bin/python2.7
2.7
: /usr/bin/python2.7
3.6
: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6m
3.6
: /Users/vikkyshostak/.local/share/virtualenvs/django_visatorus-fiOUaYzG/bin/python3.6
3.6
: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3.6
3.6
: /usr/local/bin/python3.6
3.6.4
: /Users/vikkyshostak/.local/share/virtualenvs/django_visatorus-fiOUaYzG/bin/python
2.7.10
: /usr/bin/python
3.6.4
: /Users/vikkyshostak/.local/share/virtualenvs/django_visatorus-fiOUaYzG/bin/python3
3.6.1
: /Library/Frameworks/Python.framework/Versions/3.6/bin/python3
3.6.1
: /usr/local/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.4',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '17.4.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST '
'2017; root:xnu-4570.41.2~1/RELEASE_X86_64',
'python_full_version': '3.6.4',
'python_version': '3.6',
'sys_platform': 'darwin'}
System environment variables:
ANDROID_HOME
TERM
SHELL
TMPDIR
Apple_PubSub_Socket_Render
USER
SSH_AUTH_SOCK
__CF_USER_TEXT_ENCODING
VIRTUAL_ENV
PATH
PWD
JAVA_HOME
XPC_FLAGS
PS1
XPC_SERVICE_NAME
SHLVL
HOME
LOGNAME
LC_CTYPE
TOOLBOX_VERSION
BASH_FUNC_generate_command_executed_sequence%%
_
PIP_PYTHON_PATH
PYTHONUNBUFFERED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
: /Users/vikkyshostak/.local/share/virtualenvs/django_visatorus-fiOUaYzG/bin:/usr/local/share/npm/bin:/Library/Frameworks/Python.framework/Versions/3.6/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/opt/gettext/bin:/usr/local/share/npm/bin
SHELL
: /bin/zsh
PWD
: /Users/vikkyshostak/PyCharmProjects/django_visatorus
VIRTUAL_ENV
: /Users/vikkyshostak/.local/share/virtualenvs/django_visatorus-fiOUaYzG
Contents of Pipfile
('/Users/vikkyshostak/PyCharmProjects/django_visatorus/Pipfile'):
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
django = "*"
django-rest-framework = "*"
markdown = "*"
gunicorn = "*"
django-hijack = "*"
django-hijack-admin = "*"
celery = {extras = ["redis"]}
django-admin-interface = "*"
"psycopg2-binary" = "*"
weasyprint = "*"
django-modeltranslation = {git = "https://github.com/deschler/django-modeltranslation.git"}
[dev-packages]
django-debug-toolbar = "*"
pytest-django = "*"
How to downgrade to working pipenv version?
@koddr please open a new issue describing your problem in detail.
@abulka Try running $ pipenv lock --clear
.
Tried pipenv lock --clear
as follows
pipenv --rm
Removing virtualenv (/Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E)…
Andys-MacBook-Air:proj1 Andy$ pipenv lock --clear
Creating a virtualenv for this project…
Using /usr/local/bin/python3.6m (3.6.4) to create virtualenv…
⠋Running virtualenv with interpreter /usr/local/bin/python3.6m
Using base prefix '/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E/bin/python3.6
Also creating executable in /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Could not find a version that matches requests
Tried: (no version found at all)
Got the dreaded error again. Interesting that all I've got in my Pipfile is 'requests' so why is pipenv having so much trouble and saying 'dependencies could not be resolved'?
Running python -m pipenv.help
gives
Pipenv version: '11.6.1'
Pipenv location: '/usr/local/lib/python3.6/site-packages/pipenv'
Python location: '/usr/local/opt/python/bin/python3.6'
Other Python installations in PATH
:
2.7
: /usr/bin/python2.7
2.7
: /usr/bin/python2.7
3.6
: /usr/local/bin/python3.6m
3.6
: /usr/local/bin/python3.6
3.6
: /usr/local/bin/python3.6
2.7.10
: /usr/bin/python
3.6.4
: /usr/local/bin/python3
3.6.4
: /usr/local/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.4',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '17.4.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST '
'2017; root:xnu-4570.41.2~1/RELEASE_X86_64',
'python_full_version': '3.6.4',
'python_version': '3.6',
'sys_platform': 'darwin'}
System environment variables:
TERM_PROGRAM
TERM
SHELL
TMPDIR
PERL5LIB
Apple_PubSub_Socket_Render
TERM_PROGRAM_VERSION
OLDPWD
PERL_MB_OPT
TERM_SESSION_ID
USER
SSH_AUTH_SOCK
PATH
ENV_ROLE
PLANTUML_JAR
PWD
JAVA_HOME
LANG
GRAPHVIZ_DOT
XPC_FLAGS
XPC_SERVICE_NAME
HOME
SHLVL
PERL_LOCAL_LIB_ROOT
SLIMERJSLAUNCHER
LOGNAME
ARCHFLAGS
DISPLAY
PERL_MM_OPT
_
__CF_USER_TEXT_ENCODING
PIP_PYTHON_PATH
PYTHONUNBUFFERED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
: /Users/Andy/perl5/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/Library/TeX/texbin:/opt/X11/bin:/Library/PostgreSQL/9.5/bin:/Users/Andy/scripts
SHELL
: /bin/bash
LANG
: en_AU.UTF-8
PWD
: /Users/Andy/Devel/test_pipenv/proj1
Contents of Pipfile
('/Users/Andy/Devel/test_pipenv/proj1/Pipfile'):
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
requests = "*"
[dev-packages]
[requires]
python_version = "3.6"
Well, try updating to the latest version and see if anything improves.
You might have a corrupt cache.
$ rm -fr ~/Library/caches/pip
$ rm -fr ~/Library/caches/pipenv
closing as i believe that to be the problem :)
will re-open if it seems otherwise
Sorry to say that clearing the caches didn't work. My Pipfile file is the same as above, with just 'requests' in it.
$ pipenv --rm
Removing virtualenv (/Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E)…
$ rm -fr ~/Library/caches/pip
$ rm -fr ~/Library/caches/pipenv
$ pipenv install -v
Creating a virtualenv for this project…
Using /usr/local/bin/python3.6m (3.6.4) to create virtualenv…
⠋Running virtualenv with interpreter /usr/local/bin/python3.6m
Using base prefix '/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E/bin/python3.6
Also creating executable in /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Using pip: -i https://pypi.python.org/simple
ROUND 1
Current constraints:
Finding the best candidates:
Finding secondary dependencies:
------------------------------------------------------------
Result of round 1: stable, done
Locking [packages] dependencies…
Using pip: -i https://pypi.python.org/simple
ROUND 1
Current constraints:
requests
Finding the best candidates:
Please check your version specifier and version number. See PEP440 for more information.
Using pip: -i https://pypi.python.org/simple
ROUND 1
Current constraints:
requests
Finding the best candidates:
Please check your version specifier and version number. See PEP440 for more information.
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Could not find a version that matches requests
Tried: (no version found at all)
Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Could not find a version that matches requests
Tried: (no version found at all)
Looked in caches after this
$ ls ~/library/caches/pip**
/Users/Andy/library/caches/pip:
http
/Users/Andy/library/caches/pipenv:
So I tried uninstalling pipenv using pip3 and installed pipenv using brew. Same version 11.6.1 came down - am assuming this it sourced directly from github so should be the very latest that you speak of. Cleared the caches, removed the virtual environment, ran pipenv install
with just the Pipfile and no lockfile present - same result as quoted above in this comment.
Is there any further debugging I can do? There must be some point where I can log the calculation of dependencies and why that stage is failing for me.
Specifying the --skip-lock option bypasses the problem and installed the requests package and dependencies properly.
$ pipenv install --skip-lock
Installing dependencies from Pipfile…
🐍 ▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉▉ 1/1 — 00:00:03
To activate this project's virtualenv, run the following:
$ pipenv shell
$ pipenv graph
requests==2.18.4
- certifi [required: >=2017.4.17, installed: 2018.1.18]
- chardet [required: <3.1.0,>=3.0.2, installed: 3.0.4]
- idna [required: >=2.5,<2.7, installed: 2.6]
- urllib3 [required: >=1.21.1,<1.23, installed: 1.22]
So I removed the virtual environment at that point and tried again, and for the first time, got a serious error with interesting stacktrace (maybe because I'm now using the brew version?)
$ pipenv --rm
Removing virtualenv (/Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E)…
$ pipenv install -v
Creating a virtualenv for this project…
Using /usr/local/bin/python3.6m (3.6.4) to create virtualenv…
⠋Running virtualenv with interpreter /usr/local/bin/python3.6m
Using base prefix '/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6'
New python executable in /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E/bin/python3.6
Also creating executable in /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Using pip: -i https://pypi.python.org/simple
ROUND 1
Current constraints:
Finding the best candidates:
Finding secondary dependencies:
------------------------------------------------------------
Result of round 1: stable, done
Locking [packages] dependencies…
Using pip: -i https://pypi.python.org/simple
ROUND 1
Current constraints:
requests
Finding the best candidates:
found candidate requests==2.18.4 (constraint was <any>)
Finding secondary dependencies:
requests==2.18.4 requires certifi>=2017.4.17, chardet<3.1.0,>=3.0.2, idna<2.7,>=2.5, urllib3<1.23,>=1.21.1
New dependencies found in this round:
adding ['certifi', '>=2017.4.17', '[]']
adding ['chardet', '<3.1.0,>=3.0.2', '[]']
adding ['idna', '<2.7,>=2.5', '[]']
adding ['urllib3', '<1.23,>=1.21.1', '[]']
Removed dependencies in this round:
Unsafe dependencies in this round:
------------------------------------------------------------
Result of round 1: not stable
ROUND 2
Current constraints:
certifi>=2017.4.17
chardet<3.1.0,>=3.0.2
idna<2.7,>=2.5
requests
urllib3<1.23,>=1.21.1
Finding the best candidates:
found candidate certifi==2018.1.18 (constraint was >=2017.4.17)
found candidate chardet==3.0.4 (constraint was >=3.0.2,<3.1.0)
found candidate idna==2.6 (constraint was >=2.5,<2.7)
found candidate requests==2.18.4 (constraint was <any>)
found candidate urllib3==1.22 (constraint was >=1.21.1,<1.23)
Finding secondary dependencies:
urllib3==1.22 requires -
requests==2.18.4 requires certifi>=2017.4.17, chardet<3.1.0,>=3.0.2, idna<2.7,>=2.5, urllib3<1.23,>=1.21.1
chardet==3.0.4 requires -
certifi==2018.1.18 requires -
idna==2.6 requires -
------------------------------------------------------------
Result of round 2: stable, done
Warning: Error generating hash for certifi
Traceback (most recent call last):
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/_vendor/requests/packages/urllib3/util/ssl_.py", line 295, in ssl_wrap_socket
context.load_verify_locations(ca_certs, ca_cert_dir)
FileNotFoundError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/_vendor/requests/adapters.py", line 423, in send
timeout=timeout
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/_vendor/requests/packages/urllib3/connectionpool.py", line 595, in urlopen
chunked=chunked)
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/_vendor/requests/packages/urllib3/connectionpool.py", line 352, in _make_request
self._validate_conn(conn)
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/_vendor/requests/packages/urllib3/connectionpool.py", line 831, in _validate_conn
conn.connect()
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/_vendor/requests/packages/urllib3/connection.py", line 289, in connect
ssl_version=resolved_ssl_version)
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/_vendor/requests/packages/urllib3/util/ssl_.py", line 297, in ssl_wrap_socket
raise SSLError(e)
pip9._vendor.requests.packages.urllib3.exceptions.SSLError: [Errno 2] No such file or directory
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/resolver.py", line 66, in <module>
main()
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/resolver.py", line 54, in main
results = resolve(packages, pre=do_pre, sources=project.sources, verbose=is_verbose, clear=do_clear)
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/resolver.py", line 52, in resolve
return pipenv.utils.resolve_deps(packages, which, project=project, pre=pre, sources=sources, clear=clear, verbose=verbose)
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/utils.py", line 447, in resolve_deps
collected_hashes = collected_hashes + list(list(resolver.resolve_hashes([result]).items())[0][1])
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/patched/piptools/resolver.py", line 72, in resolve_hashes
return {ireq: self.repository.get_hashes(ireq) for ireq in ireqs}
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/patched/piptools/resolver.py", line 72, in <dictcomp>
return {ireq: self.repository.get_hashes(ireq) for ireq in ireqs}
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/patched/piptools/repositories/pypi.py", line 274, in get_hashes
for candidate in matching_candidates
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/patched/piptools/repositories/pypi.py", line 274, in <setcomp>
for candidate in matching_candidates
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/patched/piptools/repositories/pypi.py", line 279, in _get_file_hash
with open_local_or_remote_file(location, self.session) as fp:
File "/usr/local/Cellar/python/3.6.4_4/Frameworks/Python.framework/Versions/3.6/lib/python3.6/contextlib.py", line 81, in __enter__
return next(self.gen)
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/patched/piptools/repositories/pypi.py", line 339, in open_local_or_remote_file
response = session.get(url, headers=headers, stream=True)
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/_vendor/requests/sessions.py", line 488, in get
return self.request('GET', url, **kwargs)
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/download.py", line 386, in request
return super(PipSession, self).request(method, url, *args, **kwargs)
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/_vendor/requests/sessions.py", line 475, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/_vendor/requests/sessions.py", line 596, in send
r = adapter.send(request, **kwargs)
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/_vendor/cachecontrol/adapter.py", line 47, in send
resp = super(CacheControlAdapter, self).send(request, **kw)
File "/usr/local/Cellar/pipenv/11.6.1/libexec/lib/python3.6/site-packages/pipenv/../pipenv/vendor/pip9/_vendor/requests/adapters.py", line 497, in send
raise SSLError(e, request=request)
pip9._vendor.requests.exceptions.SSLError: [Errno 2] No such file or directory
FYI activating the virtual environment and installing requests manually using pip works
$ pipenv shell
Spawning environment shell (/bin/bash). Use 'exit' to leave.
bash-3.2$ . /Users/Andy/.local/share/virtualenvs/proj1-ZuVNy-5E/bin/activate
$ ls
Pipfile
$ pip install requests
Collecting requests
Using cached requests-2.18.4-py2.py3-none-any.whl
Collecting urllib3<1.23,>=1.21.1 (from requests)
Using cached urllib3-1.22-py2.py3-none-any.whl
Collecting chardet<3.1.0,>=3.0.2 (from requests)
Using cached chardet-3.0.4-py2.py3-none-any.whl
Collecting idna<2.7,>=2.5 (from requests)
Using cached idna-2.6-py2.py3-none-any.whl
Collecting certifi>=2017.4.17 (from requests)
Using cached certifi-2018.1.18-py2.py3-none-any.whl
Installing collected packages: urllib3, chardet, idna, certifi, requests
Successfully installed certifi-2018.1.18 chardet-3.0.4 idna-2.6 requests-2.18.4 urllib3-1.22
we have another issue open about this.
Followed the steps above, having same issue with sub-dependencies
Was https://pypi.org/simple reachable? [pipenv.exceptions.ResolutionFailure]: req_dir=requirements_dir [pipenv.exceptions.ResolutionFailure]: File "/home/ubuntu/.local/lib/python2.7/site-packages/pipenv/utils.py", line 695, in resolve_deps [pipenv.exceptions.ResolutionFailure]: req_dir=req_dir, [pipenv.exceptions.ResolutionFailure]: File "/home/ubuntu/.local/lib/python2.7/site-packages/pipenv/utils.py", line 469, in actually_resolve_deps [pipenv.exceptions.ResolutionFailure]: resolved_tree = resolver.resolve() [pipenv.exceptions.ResolutionFailure]: File "/home/ubuntu/.local/lib/python2.7/site-packages/pipenv/utils.py", line 408, in resolve [pipenv.exceptions.ResolutionFailure]: raise ResolutionFailure(message=str(e)) [pipenv.exceptions.ResolutionFailure]: ResolutionFailure: ERROR: ERROR: Could not find a version that matches python [pipenv.exceptions.ResolutionFailure]: No versions found [pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies. First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again. Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation. Hint: try $ pipenv lock --pre if it is a pre-release dependency. [[source]] ERROR: ERROR: Could not find a version that matches python No versions found Was https://pypi.org/simple reachable?
Has anyone found a solution or workaround on this bug?
I am facing the same situation, but trying to make Django works with MySQL.
pipenv install libmysqlclient-dev
Installing libmysqlclient-dev…
Adding libmysqlclient-dev to Pipfile's [packages]…
Installation Succeeded
Pipfile.lock (55a972) out of date, updating to (59aa59)…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Locking Failed!
First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: Could not find a version that matches libmysqlclient-dev
No versions found
Was https://pypi.org/simple reachable?
First try clearing your dependency cache with $ pipenv lock --clear, then try the original command again.
Alternatively, you can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: ERROR: Could not find a version that matches libmysqlclient-dev
No versions found
Was https://pypi.org/simple reachable?
I had installed Python 3.7.4 using pyenv and I don't fully understand the reason but my Pipfile had this line in package list
[packages]
3-7-4 = "*"
Removing the 3-7-4 line fixed the issue for me.
Most helpful comment