question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

pipenv - Installed via Homebrew - errors on matplotlib installation

See original GitHub issue

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$ 

verbose.log

Tagging: @vphilippon

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:15 (7 by maintainers)

github_iconTop GitHub Comments

4reactions
axitkhuranacommented, Dec 8, 2017

@cmlccie Saw this issue, I was facing the same with installing jupyter and reading @vphilippon 's comment, the workaround that worked for me:

  1. Uninstall homebrew based pipenv
  2. brew install python3 (If you don’t have already)
  3. python3 -m pip install pipenv

Now try installing matplotlib. Should work until the PR is merged in homebrew.

2reactions
kennethreitzcommented, Dec 19, 2017

removed! ✨🍰✨

Read more comments on GitHub >

github_iconTop Results From Across the Web

pipenv - Homebrew Formulae
pipenv. Install command: brew install pipenv. Python dependency management tool. https://github.com/pypa/pipenv. License: MIT.
Read more >
Install pipenv using brew on Python 3.6 - Stack Overflow
First, I ran $ brew install pipenv . Then, brew install python 3.7 automatically and I can use pipenv properly. But, I want...
Read more >
Pip cannot install packages after upgrading to Catalina
Looks like it's a problem with SortedDict. I can pip install ... (I was only manually installing sorteddict because pipenv wasn't working.).
Read more >
Pipenv & Virtual Environments
This tutorial walks you through installing and using Python packages. It will show you how to install and use the necessary tools and...
Read more >
Pipenv & Virtual Environments
This tutorial walks you through installing and using Python packages. ... with an installer from python.org, or via Homebrew you should already have...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found