pipenv: pipenv - Installed via Homebrew - errors on matplotlib installation
Pipenv (installed via Homebrew) crashes after installing matplotlib
. To verify that it wasn’t something in my environment, I have replicated it on a clean-build VM of macOS High Sierra 10.13.1 (17B1003). Note that matplotlib installs fine in this environment manually (using python -m venv
and pip install matplotlib
), and it appears that pipenv successfully installs it into the virtual environment created by pipenv. However, pipenv errors-out after the installation and doesn’t produce a lock file.
Environment:
- macOS High Sierra 10.13.1
- Python Interpreters:
python
Python 2.7.10 (system)python2
Python 2.7.14 (installed via pyenv)python3
Python 3.6.3 (installed via pyenv)
- pipenv, version 8.3.2 (installed via homebrew)
Steps to Reproduce:
$ mkdir -p ~/dev/projects/pipenv-matplotlib
$ cd ~/dev/projects/pipenv-matplotlib
$ pipenv install --three --verbose matplotlib
Output: (verbose output attached)
Chriss-Mac:pipenv-matplotlib cmlccie$ pipenv install --three --verbose matplotlib > verbose.log
Creating a virtualenv for this project…
Running virtualenv with interpreter /usr/local/bin/python3
Using base prefix '/Users/cmlccie/.pyenv/versions/3.6.3'
New python executable in /Users/cmlccie/.local/share/virtualenvs/pipenv-matplotlib-XtkrZ9f3/bin/python3
Also creating executable in /Users/cmlccie/.local/share/virtualenvs/pipenv-matplotlib-XtkrZ9f3/bin/python
Installing setuptools, pip, wheel...done.
Virtualenv location: /Users/cmlccie/.local/share/virtualenvs/pipenv-matplotlib-XtkrZ9f3
Creating a Pipfile for this project…
Installing u'matplotlib'
$ "/Users/cmlccie/.local/share/virtualenvs/pipenv-matplotlib-XtkrZ9f3/bin/pip" install --verbose "matplotlib" -i https://pypi.python.org/simple --exists-action w
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Traceback (most recent call last):
File "/usr/local/Cellar/pipenv/8.3.2/libexec/bin/pipenv", line 11, in <module>
load_entry_point('pipenv==8.3.2', 'console_scripts', 'pipenv')()
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/cli.py", line 1935, in install
do_lock(system=system, pre=pre)
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/cli.py", line 1121, in do_lock
pre=pre
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/utils.py", line 461, in resolve_deps
resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 200, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 296, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 153, in get_dependencies
result = reqset._prepare_file(self.finder, ireq)
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 639, in _prepare_file
abstract_dist.prep_for_dist()
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 134, in prep_for_dist
self.req_to_install.run_egg_info()
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/patched/pip/req/req_install.py", line 438, in run_egg_info
command_desc='python setup.py egg_info')
File "/usr/local/Cellar/pipenv/8.3.2/libexec/lib/python2.7/site-packages/pipenv/patched/pip/utils/__init__.py", line 707, in call_subprocess
% (command_desc, proc.returncode, cwd))
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /var/folders/sh/5sddjf85009d0585hwjxd3cr0000gn/T/tmpRZW5Ttbuild/subprocess32/
Chriss-Mac:pipenv-matplotlib cmlccie$
Tagging: @vphilippon
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 15 (7 by maintainers)
@cmlccie Saw this issue, I was facing the same with installing jupyter and reading @vphilippon 's comment, the workaround that worked for me:
brew install python3
(If you don’t have already)python3 -m pip install pipenv
Now try installing matplotlib. Should work until the PR is merged in homebrew.
removed! ✨🍰✨
That’s one way to correct an issue. Documentation bug - fixed. 😁
Though you missed one… https://github.com/pypa/pipenv
https://docs.pipenv.org/install/#homebrew-installation-of-pipenv yeah ya do
edit: cmlccie beat me to it
@vphilippon Thanks for the notification. My issue is indeed related to #1172 and therefore fixed in current master. Thank you.