Very similar to #1802 but there is a difference, I'm not using --pre. This issue is easily and consistently reproducible. I've tried on multiple systems.
Output from $ python -m pipenv.help:
$ python -m pipenv.help output
Pipenv version: '11.10.0'
Pipenv location: '/usr/local/lib/python3.6/dist-packages/pipenv'
Python location: '/usr/bin/python3.6'
Other Python installations in PATH:
2.7: /usr/bin/python2.72.7: /usr/bin/python2.73.5: /usr/bin/python3.5m3.5: /usr/bin/python3.53.6: /usr/bin/python3.6m3.6: /usr/bin/python3.6
2.7.12: /usr/bin/python
2.7.12: /usr/bin/python23.5.2: /usr/bin/python3PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.5',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '4.4.0-119-generic',
'platform_system': 'Linux',
'platform_version': '#143-Ubuntu SMP Mon Apr 2 16:08:24 UTC 2018',
'python_full_version': '3.6.5',
'python_version': '3.6',
'sys_platform': 'linux'}
System environment variables:
USERLOGNAMEHOMEPATHMAILSHELLSSH_CLIENTSSH_CONNECTIONSSH_TTYTERMDISPLAYXDG_SESSION_IDXDG_RUNTIME_DIRLANGLANGUAGESSH_AUTH_SOCKSHLVLPWDOLDPWDGOPATHPYENV_ROOTANDROID_SDKANDROID_NDKROOT_DIRTZPS1ORIGINAL_PS1RPS1PYTHONSTARTUPPIP_DISABLE_PIP_VERSION_CHECKPIPENV_VENV_IN_PROJECTSSH_AGENT_PIDLS_OPTIONSGIT_MERGE_AUTOEDITWORKON_HOMEPROJECT_HOME_VIRTUALENVWRAPPER_APIVIRTUALENVWRAPPER_SCRIPTKEYTIMEOUTLS_COLORSCLICOLORLSCOLORSEDITORHISTFILEFZF_DEFAULT_COMMANDFZF_DEFAULT_OPTS_PYTHONDONTWRITEBYTECODEPIP_PYTHON_PATHPYTHONUNBUFFEREDPipenv鈥搒pecific environment variables:
PIPENV_VENV_IN_PROJECT: trueDebug鈥搒pecific environment variables:
PATH: /usr/local/bin:test///go/bin:test///bin:/usr/local/sbin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:~/bin:test///bin:test///.fzf/binSHELL: /bin/zshEDITOR: vimLANG: en_US.UTF-8PWD: testContents of Pipfile ('test///workspace/test/Pipfile'):
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
eth-account = "*"
[dev-packages]
[requires]
python_version = "3.6"
An environment with the package and dependencies installed
Consistent warnings about not being able to find matching versions while valid versions are available.
# rm -rf ~/.cache Pipfile* .venv
# pipenv install eth-account
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 eth-keys<0.3.0,>=0.2.0b3
Tried: 0.1.0b1, 0.1.0b1, 0.1.0b2, 0.1.0b2, 0.1.0b3, 0.1.0b3, 0.1.0b4, 0.1.0b4, 0.2.0b1, 0.2.0b1, 0.2.0b2, 0.2.0b2, 0.2.0b3, 0.2.0b3
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 eth-keys<0.3.0,>=0.2.0b3
Tried: 0.1.0b1, 0.1.0b1, 0.1.0b2, 0.1.0b2, 0.1.0b3, 0.1.0b3, 0.1.0b4, 0.1.0b4, 0.2.0b1, 0.2.0b1, 0.2.0b2, 0.2.0b2, 0.2.0b3, 0.2.0b3
Actual output (1500 lines): install.log
I've done some automated testing and it appears that this broke after 10.0.0, for the time being I'll just run the old version to work around this issue
I'm not using --pre
Could not find a version that matches eth-keys<0.3.0,>=0.2.0b3
Tried: 0.1.0b1, 0.1.0b1, 0.1.0b2, 0.1.0b2, 0.1.0b3, 0.1.0b3, 0.1.0b4, 0.1.0b4, 0.2.0b1, 0.2.0b1, 0.2.0b2, 0.2.0b2, 0.2.0b3, 0.2.0b3
So the valid versions that match this specifier are: 0.2.0b3
That's it.
According to pep 440 this (and anything that has a 'b' or an 'a' or whatever) is a 'prerelease'. So I'll go back to what I quoted before:
I'm not using --pre
Exactly. You're not using --pre. So pipenv will never assume that it's ok to install prereleases. Use --pre if you want to install prereleases.
That makes sense but in that case the warning should be different and specify that it's not considering the pre-releases.
@techalchemy Should I create a pull request that adds an extra line about the pre-releases? Something like this perhaps:
Could not find a version that matches eth-keys<0.3.0,>=0.2.0b3
Tried: 0.1.0, 0.1.1
Skipped pre-releases: 0.1.0b1, 0.1.0b1
@WoLpH The suggested change makes sense to me. Go ahead.
I already merged a change that handles this.
Even with that fix I still think the current message is incorrect. It says "Tried: ..." when it actually doesn't even consider them.
I for one completely forgot about the b meaning pre-release and I'm probably not the only one.
@WoLpH yes the current message is still incorrect, because it isn't released yet. I don't think we need to overcomplicate this messaging too much since if it didn't install anything, technically it didn't try anything. The fact of the matter is _NOTHING_ matched your version specifiers, so literally everything was skipped including the prereleases.
I understand how the other fix might help a bit but I still think you'll get issues similar to this one because it's unclear why it's skipping them when they appear perfectly valid options.
Looking at the code I think the change could be fairly simple: https://github.com/pypa/pipenv/blob/2dbb8bc1febda53b0a39130bd80af6627c0c2365/pipenv/patched/piptools/exceptions.py#L11-L23
There is a version evaluator that will tell you if it's a pre-release. I'd recommend PR'ing it up to pip-tools and then we can have @vphilippon review it there.
Most helpful comment
Even with that fix I still think the current message is incorrect. It says "Tried: ..." when it actually doesn't even consider them.
I for one completely forgot about the
bmeaning pre-release and I'm probably not the only one.