installing with Pipfile behaves differently when installing without when using incompatible packages
See original GitHub issueBe sure to check the existing issues (both open and closed!).
Describe the issue briefly here.
installing incompatible packages on purpose. azure 2.00 wants azure-mgmt-compute ~1.0.0, but we need 3.0.1. so far works for us using just pip
This works fine:
pipenv install --skip-lock azure==2.0.0 azure-mgmt-compute==3.0.1
However, if we want to recreate the virtualenv from scratch and use the Pipfile generated by the above command, the result is that we have both 1.0.0 and 3.0.1 of azure-mgmt-compute installed in site-packages. I can verify this by looking at …/site-packages/azure/mgmt/compute/. If there is another computer dir under that, then 1.0.0 is installed. If compute_management_client.py is there, then 3.0.1 is installed. It seems though that 1.0.0 is active because of the errors we get when running our code.
Please run $ python -m pipenv.help
, and paste the results here.
$ python -m pipenv.help output
Pipenv version: '11.10.0'
Pipenv location: '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pipenv'
Python location: '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python'
Other Python installations in PATH
:
-
2.6
:/opt/local/bin/python2.6
-
2.6
:/opt/local/bin/python2.6
-
2.6
:/opt/local/bin/python2.6
-
2.7
:/opt/local/bin/python2.7
-
2.7
:/opt/local/bin/python2.7
-
2.7
:/opt/local/bin/python2.7
-
2.7
:/usr/bin/python2.7
-
3.6
:/opt/local/bin/python3.6m
-
3.6
:/opt/local/bin/python3.6
-
3.6
:/opt/local/bin/python3.6
-
2.7.14
:/opt/local/bin/python
-
2.7.14
:/opt/local/bin/python
-
2.7.10
:/usr/bin/python
-
2.7.14
:/opt/local/bin/python2
-
2.7.14
:/opt/local/bin/python2
-
3.6.4
:/opt/local/bin/python3
-
3.6.4
:/opt/local/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '0',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '17.5.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64',
'python_full_version': '2.7.14',
'python_version': '2.7',
'sys_platform': 'darwin'}
System environment variables:
TERM_PROGRAM_VERSION
LOGNAME
USER
HOME
PATH
PYTHONUNBUFFERED
DISPLAY
TERM_PROGRAM
LANG
TERM
Apple_PubSub_Socket_Render
COLORFGBG
CDPATH
SHLVL
VIEW_NAME
XPC_FLAGS
ITERM_SESSION_ID
VIEW_DIR
GITLAB_PRIVATE_TOKEN
TERM_SESSION_ID
XPC_SERVICE_NAME
OMF_PATH
SSH_AUTH_SOCK
SHELL
PYTHONDONTWRITEBYTECODE
ITERM_PROFILE
PIP_PYTHON_PATH
OMF_CONFIG
TMPDIR
__CF_USER_TEXT_ENCODING
PWD
OBJC_DISABLE_INITIALIZE_FORK_SAFETY
COLORTERM
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/opt/local/bin:/opt/local/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/go/bin:/Users/gdavid/bin
SHELL
:/opt/local/bin/fish
LANG
:en_US.UTF-8
PWD
:/Users/gdavid/pipenv-test-2
Contents of Pipfile
(‘/Users/gdavid/pipenv-test-2/Pipfile’):
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
[packages]
azure = "==2.0.0"
azure-mgmt-compute = "==3.0.1"
[requires]
python_version = "2.7"
If you’re on MacOS, just run the following:
$ python -m pipenv.help | pbcopy
error running this on my Mac:
Traceback (most recent call last): File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py”, line 174, in _run_module_as_main “main”, fname, loader, pkg_name) File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py”, line 72, in _run_code exec code in run_globals File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pipenv/help.py”, line 89, in <module> main() File “/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pipenv/help.py”, line 48, in main print(u’Pipenv–specific environment variables:‘) UnicodeEncodeError: ‘ascii’ codec can’t encode character u’\u2013’ in position 6: ordinal not in range(128)
And this in my clipboard:
$ python -m pipenv.help output
Pipenv version: '11.10.0'
Pipenv location: '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pipenv'
Python location: '/opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python'
Other Python installations in PATH
:
-
2.6
:/opt/local/bin/python2.6
-
2.6
:/opt/local/bin/python2.6
-
2.6
:/opt/local/bin/python2.6
-
2.7
:/opt/local/bin/python2.7
-
2.7
:/opt/local/bin/python2.7
-
2.7
:/opt/local/bin/python2.7
-
2.7
:/usr/bin/python2.7
-
3.6
:/opt/local/bin/python3.6m
-
3.6
:/opt/local/bin/python3.6
-
3.6
:/opt/local/bin/python3.6
-
2.7.14
:/opt/local/bin/python
-
2.7.14
:/opt/local/bin/python
-
2.7.10
:/usr/bin/python
-
2.7.14
:/opt/local/bin/python2
-
2.7.14
:/opt/local/bin/python2
-
3.6.4
:/opt/local/bin/python3
-
3.6.4
:/opt/local/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '0',
'os_name': 'posix',
'platform_machine': 'x86_64',
'platform_python_implementation': 'CPython',
'platform_release': '17.5.0',
'platform_system': 'Darwin',
'platform_version': 'Darwin Kernel Version 17.5.0: Mon Mar 5 22:24:32 PST 2018; root:xnu-4570.51.1~1/RELEASE_X86_64',
'python_full_version': '2.7.14',
'python_version': '2.7',
'sys_platform': 'darwin'}
System environment variables:
TERM_PROGRAM_VERSION
LOGNAME
USER
HOME
PATH
PYTHONUNBUFFERED
DISPLAY
TERM_PROGRAM
LANG
TERM
Apple_PubSub_Socket_Render
COLORFGBG
CDPATH
SHLVL
VIEW_NAME
XPC_FLAGS
ITERM_SESSION_ID
VIEW_DIR
GITLAB_PRIVATE_TOKEN
TERM_SESSION_ID
XPC_SERVICE_NAME
OMF_PATH
SSH_AUTH_SOCK
SHELL
PYTHONDONTWRITEBYTECODE
ITERM_PROFILE
PIP_PYTHON_PATH
OMF_CONFIG
TMPDIR
__CF_USER_TEXT_ENCODING
PWD
OBJC_DISABLE_INITIALIZE_FORK_SAFETY
COLORTERM
Expected result
Describe what you expected.
Expected running with or without a Pipfile would result in the same installation.
Actual result
When possible, provide the verbose output (--verbose
), especially for locking and dependencies resolving issues.
Installing with the Pipfile installed azure-mgmt-compute 3.0.1 first then installed azure-mgmt-compute 1.0.0 on top of it.
Running without the Pipfile resulted in 1.0.0 installed first and then 3.0.1 on top of it which uninstalls 1.0.0. Probably because I specify the order of the packages: pipenv install --skip-lock azure==2.0.0 azure-mgmt-compute==3.0.1
Whereas I can’t specify the order of the packages when running form the Pipfile.
Steps to replicate
Provide the steps to replicate (which usually at least includes the commands and the Pipfile).
run the following:
pipenv install --skip-lock azure==2.0.0 azure-mgmt-compute==3.0.1
This will have the expected result: azure-mgmt-compute==3.0.1 is installed
Then delete the virtualenv: pipenv --rm
The using the generated Pipfile: pipenv install
This will have both 1.0.0 and 3.0.1 installed with 1.0.0 active.
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (4 by maintainers)
Top GitHub Comments
@gsalsero you can actually put
azure
in[dev-packages]
andazure-mgmt-compute
in[packages]
and this should allow you to generate a lockfile:This is a nifty workaround that I usually recommend, since pipenv will always let
packages
win conflicts when they are encountered.I appreciate your help. That works like charm!