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.7
2.7
: /usr/bin/python2.7
3.5
: /usr/bin/python3.5m
3.5
: /usr/bin/python3.5
3.6
: /usr/bin/python3.6m
3.6
: /usr/bin/python3.6
2.7.12
: /usr/bin/python
2.7.12
: /usr/bin/python2
3.5.2
: /usr/bin/python3
PEP 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:
USER
LOGNAME
HOME
PATH
MAIL
SHELL
SSH_CLIENT
SSH_CONNECTION
SSH_TTY
TERM
DISPLAY
XDG_SESSION_ID
XDG_RUNTIME_DIR
LANG
LANGUAGE
SSH_AUTH_SOCK
SHLVL
PWD
OLDPWD
GOPATH
PYENV_ROOT
ANDROID_SDK
ANDROID_NDK
ROOT_DIR
TZ
PS1
ORIGINAL_PS1
RPS1
PYTHONSTARTUP
PIP_DISABLE_PIP_VERSION_CHECK
PIPENV_VENV_IN_PROJECT
SSH_AGENT_PID
LS_OPTIONS
GIT_MERGE_AUTOEDIT
WORKON_HOME
PROJECT_HOME
_VIRTUALENVWRAPPER_API
VIRTUALENVWRAPPER_SCRIPT
KEYTIMEOUT
LS_COLORS
CLICOLOR
LSCOLORS
EDITOR
HISTFILE
FZF_DEFAULT_COMMAND
FZF_DEFAULT_OPTS
_
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
PYTHONUNBUFFERED
Pipenv鈥搒pecific environment variables:
PIPENV_VENV_IN_PROJECT
: true
Debug鈥搒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/bin
SHELL
: /bin/zsh
EDITOR
: vim
LANG
: en_US.UTF-8
PWD
: test
Contents 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
b
meaning pre-release and I'm probably not the only one.