pipenv fails to install matplotlib
See original GitHub issueAttempting to install matplotlib using pipenv erroneously pulls in subprocess32. Installing directly with pip under a virtualenv works correctly. My python setup is a described by jacobian (ie, pyenv->pipsi->pipenv). This is on Raspbian GNU/Linux 9.4 (stretch), an ARM platform.
$ python -m pipenv.help output
Pipenv version: '11.9.0'
Pipenv location: '/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv'
Python location: '/home/pi/.local/venvs/pipenv/bin/python'
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
:/home/pi/.pyenv/shims/python3.6m
-
3.6
:/home/pi/.pyenv/shims/python3.6
-
3.6.4
:/home/pi/.pyenv/shims/python
-
2.7.13
:/usr/bin/python
-
2.7.13
:/usr/bin/python2
-
3.6.4
:/home/pi/.pyenv/shims/python3
-
3.5.3
:/usr/bin/python3
PEP 508 Information:
{'implementation_name': 'cpython',
'implementation_version': '3.6.4',
'os_name': 'posix',
'platform_machine': 'armv7l',
'platform_python_implementation': 'CPython',
'platform_release': '4.9.80-v7+',
'platform_system': 'Linux',
'platform_version': '#1098 SMP Fri Mar 9 19:11:42 GMT 2018',
'python_full_version': '3.6.4',
'python_version': '3.6',
'sys_platform': 'linux'}
System environment variables:
LS_COLORS
SSH_CONNECTION
LANG
OLDPWD
INFINALITY_FT_CHROMEOS_STYLE_SHARPENING_STRENGTH
INFINALITY_FT_AUTOHINT_INCREASE_GLYPH_HEIGHTS
INFINALITY_FT_CONTRAST
PYENV_VIRTUALENV_INIT
INFINALITY_FT_STEM_FITTING_STRENGTH
INFINALITY_FT_GLOBAL_EMBOLDEN_X_VALUE
XDG_SESSION_ID
USER
INFINALITY_FT_AUTOHINT_SNAP_STEM_HEIGHT
INFINALITY_FT_GRAYSCALE_FILTER_STRENGTH
INFINALITY_FT_GAMMA_CORRECTION
PWD
HOME
TEXTDOMAIN
SSH_CLIENT
TMUX
INFINALITY_FT_WINDOWS_STYLE_SHARPENING_STRENGTH
SSH_TTY
INFINALITY_FT_BRIGHTNESS
MAIL
TERM
SHELL
INFINALITY_FT_USE_VARIOUS_TWEAKS
TMUX_PANE
PYENV_SHELL
SHLVL
INFINALITY_FT_BOLD_EMBOLDEN_Y_VALUE
INFINALITY_FT_GLOBAL_EMBOLDEN_Y_VALUE
INFINALITY_FT_AUTOHINT_HORIZONTAL_STEM_DARKEN_STRENGTH
LOGNAME
DBUS_SESSION_BUS_ADDRESS
XDG_RUNTIME_DIR
PATH
INFINALITY_FT_FILTER_PARAMS
INFINALITY_FT_USE_KNOWN_SETTINGS_ON_SELECTED_FONTS
INFINALITY_FT_STEM_SNAPPING_SLIDING_SCALE
INFINALITY_FT_STEM_ALIGNMENT_STRENGTH
INFINALITY_FT_BOLD_EMBOLDEN_X_VALUE
INFINALITY_FT_AUTOHINT_VERTICAL_STEM_DARKEN_STRENGTH
INFINALITY_FT_FRINGE_FILTER_STRENGTH
_
PYTHONDONTWRITEBYTECODE
PIP_PYTHON_PATH
PYTHONUNBUFFERED
Pipenv–specific environment variables:
Debug–specific environment variables:
PATH
:/home/pi/.pyenv/plugins/pyenv-virtualenv/shims:/home/pi/.pyenv/shims:/home/pi/.pyenv/bin:/home/pi/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/games:/usr/games
SHELL
:/bin/bash
LANG
:en_GB.UTF-8
PWD
:/home/pi
Contents of Pipfile
(‘/home/pi/Pipfile’):
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[packages]
[dev-packages]
[requires]
python_version = "3.6"
Expected result
Matplotlib successfully installed
Actual result
Matplotlib install fails b/c it’s trying to pull in subprocess32, which is not needed by Python3.6. Full log attached. pipenv-matplotlib.log
pi@raspberrypi:~/tmp$ pipenv install matplotlib -v 2>&1 |tee pipenv-matplotlib.log
Creating a virtualenv for this project…
Using /home/pi/.pyenv/versions/3.6.4/bin/python3.6m (3.6.4) to create virtualenv…
Running virtualenv with interpreter /home/pi/.pyenv/versions/3.6.4/bin/python3.6m
Using base prefix '/home/pi/.pyenv/versions/3.6.4'
New python executable in /home/pi/.local/share/virtualenvs/pi-V9tpwFal/bin/python3.6m
Also creating executable in /home/pi/.local/share/virtualenvs/pi-V9tpwFal/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /home/pi/.local/share/virtualenvs/pi-V9tpwFal
Installing matplotlib…
...
INFO:notpip.req.req_set:Collecting subprocess32==3.2.7
INFO:pip9.download:File was already downloaded /home/pi/.cache/pipenv/pkgs/subprocess32-3.2.7.tar.gz
INFO:pip9.utils:Complete output from command python setup.py egg_info:
INFO:pip9.utils:This backport is for Python 2.x only.
----------------------------------------
Traceback (most recent call last):
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/resolver.py", line 82, in <module>
main()
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/resolver.py", line 71, in main
clear=do_clear,
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/resolver.py", line 63, in resolve
verbose=verbose,
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/utils.py", line 425, in resolve_deps
pre,
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/utils.py", line 336, in actually_resolve_reps
resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 200, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/piptools/resolver.py", line 297, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 174, in get_dependencies
legacy_results = self.get_legacy_dependencies(ireq)
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 222, in get_legacy_dependencies
result = reqset._prepare_file(self.finder, ireq, ignore_requires_python=True)
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/notpip/req/req_set.py", line 644, in _prepare_file
abstract_dist.prep_for_dist()
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/patched/notpip/req/req_set.py", line 134, in prep_for_dist
self.req_to_install.run_egg_info()
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/pip9/req/req_install.py", line 439, in run_egg_info
command_desc='python setup.py egg_info')
File "/home/pi/.local/venvs/pipenv/lib/python3.6/site-packages/pipenv/vendor/pip9/utils/__init__.py", line 707, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip9.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmp4e0pkookbuild/subprocess32/
Steps to replicate
run pipenv install matplotlib
Issue Analytics
- State:
- Created 5 years ago
- Comments:14 (7 by maintainers)
Top GitHub Comments
@techalchemy: this is still occurring with a pipenv installed from master. Logs attached. pipenv-master.txt pipenv-matplotlib-2.log
Something is very wrong with, like, many things. The resolver clearly thinks your virtualenv runs Python 2. It even tries to download the cp27 (CPyhton 2.7) wheel. How about… deleting the virtualenv (
pipenv --rm
) and start from scratch?