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.

I am getting error when installing package using pipenv.

See original GitHub issue

I am trying to install coala-bears in a virtual environment using pipenv, I am getting error when using pipenv but I am able to install coala-bears using simple pip.

Describe your environment
  1. OS Type - Linux (Fedora - 26)
  2. Python version: Python 3.6.2
  3. Pipenv version: version 8.2.6
Expected result

coala-bears is installed with all its dependancies.

Actual result
Traceback (most recent call last):
  File "/usr/bin/pipenv", line 11, in <module>
    load_entry_point('pipenv==8.2.6', 'console_scripts', 'pipenv')()
  File "/usr/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/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/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/lib/python2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/pipenv/cli.py", line 1852, in install
    do_lock(system=system, pre=pre)
  File "/usr/lib/python2.7/site-packages/pipenv/cli.py", line 1083, in do_lock
    pre=pre
  File "/usr/lib/python2.7/site-packages/pipenv/utils.py", line 421, in resolve_deps
    resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
  File "/usr/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 101, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 199, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/usr/lib/python2.7/site-packages/pipenv/patched/piptools/resolver.py", line 278, in _iter_dependencies
    for dependency in self.repository.get_dependencies(ireq):
  File "/usr/lib/python2.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 171, in get_dependencies
    result = reqset._prepare_file(self.finder, ireq)
  File "/usr/lib/python2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 639, in _prepare_file
    abstract_dist.prep_for_dist()
  File "/usr/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/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/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 /tmp/tmpIGoBs3build/functools32/

Issue Analytics

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

github_iconTop GitHub Comments

14reactions
bikesheddercommented, Feb 5, 2018

I had the same error with pipenv and finally found the problem. When installing pipenv I used pip instead of pip3 so pipenv was installed using Python 2.7 and not 3.6.

Steps to reproduce:

pip install --user pipenv
pipenv --python 3.6
pipenv install connexion
# bails out with an error :-(

The error does not occur when installing pipenv using pip3:

pip uninstall pipenv
pip3 install --user pipenv
pipenv --python 3.6
pipenv install connexion
# no errors, horray! :-)
8reactions
bikesheddercommented, Feb 5, 2018

Maybe pipenv should produce a warning when it is running using Python 2.7 and tries to install packages for a Python 3.x environment?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Python 3 - Pipenv Can't Install Getting Error - Stack Overflow
Pipenv at a high-level is used for running, installing and executing the installed packages within a python environment.
Read more >
Common Pipenv Errors and How to Solve Them: Why Won't it ...
The second most common reason locking fails is that we attempt to install a package that is a pre-release version. You can resolve...
Read more >
Frequently Encountered Pipenv Problems - Read the Docs
This is usually a result of mixing Pipenv with system packages. We strongly recommend installing Pipenv in an isolated environment.
Read more >
Pipenv & Virtual Environments - Python Packaging Authority
This tutorial walks you through installing and using Python packages. It will show you how to install ... If you're newcomer and you...
Read more >
Configure a Pipenv environment | PyCharm Documentation
Install Pipenv  · Run the following command: $ py -m site --user-site. A sample output can be: · Replace site-packages with Scripts...
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