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.

Not-helpful information when locking is failed: pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1

See original GitHub issue

When I try to install some package (pycocotools), I encountered follwoing error. This is not pipenv’s fault, but I want pipenv to improve.

Current error message doesn’t give information to solve the problem even with --verbose option. We can’t find why setup.py is failed.

So I suggest to add functionality “super verbose” mode, which show everything regarding the install process.

(n_project_bone) endo@ohmasa-com:~/works/codes/n_project_bone$ pipenv lock --clear --verbose
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
✘ Locking Failed! 
Using pip: -i https://pypi.org/simple
Using pip: -i https://pypi.org/simple
Using pip: -i https://pypi.org/simple

                          ROUND 1                           
Current constraints:
  opencv-python
  pillow
  pycocotools
  tensorflow

Finding the best candidates:
  found candidate opencv-python==4.1.1.26 (constraint was <any>)
  found candidate pillow==6.1.0 (constraint was <any>)
  found candidate pycocotools==2.0.0 (constraint was <any>)
  found candidate tensorflow==1.14.0 (constraint was <any>)

Finding secondary dependencies:
  tensorflow==1.14.0 not in cache, need to check index
  tensorflow==1.14.0        requires absl-py>=0.7.0, astor>=0.6.0, gast>=0.2.0, google-pasta>=0.1.6, grpcio>=1.8.6, keras-applications>=1.0.6, keras-preprocessing>=1.0.5, numpy<2.0,>=1.14.5, protobuf>=3.6.1, six>=1.10.0, tensorboard<1.15.0,>=1.14.0, tensorflow-estimator<1.15.0rc0,>=1.14.0rc0, termcolor>=1.1.0, wheel>=0.26, wrapt>=1.11.1
  opencv-python==4.1.1.26 not in cache, need to check index
  opencv-python==4.1.1.26   requires numpy>=1.11.3
  pillow==6.1.0 not in cache, need to check index
  pillow==6.1.0             requires -
  pycocotools==2.0.0 not in cache, need to check index
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/pipenv/resolver.py", line 126, in <module>
    main()
  File "/usr/local/lib/python3.6/dist-packages/pipenv/resolver.py", line 119, in main
    parsed.requirements_dir, parsed.packages)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/resolver.py", line 85, in _main
    requirements_dir=requirements_dir,
  File "/usr/local/lib/python3.6/dist-packages/pipenv/resolver.py", line 69, in resolve
    req_dir=requirements_dir
  File "/usr/local/lib/python3.6/dist-packages/pipenv/utils.py", line 726, in resolve_deps
    req_dir=req_dir,
  File "/usr/local/lib/python3.6/dist-packages/pipenv/utils.py", line 480, in actually_resolve_deps
    resolved_tree = resolver.resolve()
  File "/usr/local/lib/python3.6/dist-packages/pipenv/utils.py", line 385, in resolve
    results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/piptools/resolver.py", line 206, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/piptools/resolver.py", line 301, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 234, in get_dependencies
    legacy_results = self.get_legacy_dependencies(ireq)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 426, in get_legacy_dependencies
    results, ireq = self.resolve_reqs(download_dir, ireq, wheel_cache)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 297, in resolve_reqs
    results = resolver._resolve_one(reqset, ireq)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/notpip/_internal/resolve.py", line 260, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/notpip/_internal/resolve.py", line 213, in _get_abstract_dist_for
    self.require_hashes
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 294, in prepare_linked_requirement
    abstract_dist.prep_for_dist(finder, self.build_isolation)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 127, in prep_for_dist
    self.req.run_egg_info()
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/notpip/_internal/req/req_install.py", line 474, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/notpip/_internal/utils/misc.py", line 705, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmp_2psbq_0build/pycocotools/
Using pip: -i https://pypi.org/simple
Using pip: -i https://pypi.org/simple

                          ROUND 1                           
Current constraints:
  opencv-python
  pillow
  pycocotools
  tensorflow

Finding the best candidates:
  found candidate opencv-python==4.1.1.26 (constraint was <any>)
  found candidate pillow==6.1.0 (constraint was <any>)
  found candidate pycocotools==2.0.0 (constraint was <any>)
  found candidate tensorflow==1.14.0 (constraint was <any>)

Finding secondary dependencies:
  tensorflow==1.14.0 not in cache, need to check index
  tensorflow==1.14.0        requires absl-py>=0.7.0, astor>=0.6.0, gast>=0.2.0, google-pasta>=0.1.6, grpcio>=1.8.6, keras-applications>=1.0.6, keras-preprocessing>=1.0.5, numpy<2.0,>=1.14.5, protobuf>=3.6.1, six>=1.10.0, tensorboard<1.15.0,>=1.14.0, tensorflow-estimator<1.15.0rc0,>=1.14.0rc0, termcolor>=1.1.0, wheel>=0.26, wrapt>=1.11.1
  opencv-python==4.1.1.26 not in cache, need to check index
  opencv-python==4.1.1.26   requires numpy>=1.11.3
  pillow==6.1.0 not in cache, need to check index
  pillow==6.1.0             requires -
  pycocotools==2.0.0 not in cache, need to check index
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/dist-packages/pipenv/resolver.py", line 126, in <module>
    main()
  File "/usr/local/lib/python3.6/dist-packages/pipenv/resolver.py", line 119, in main
    parsed.requirements_dir, parsed.packages)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/resolver.py", line 85, in _main
    requirements_dir=requirements_dir,
  File "/usr/local/lib/python3.6/dist-packages/pipenv/resolver.py", line 69, in resolve
    req_dir=requirements_dir
  File "/usr/local/lib/python3.6/dist-packages/pipenv/utils.py", line 726, in resolve_deps
    req_dir=req_dir,
  File "/usr/local/lib/python3.6/dist-packages/pipenv/utils.py", line 480, in actually_resolve_deps
    resolved_tree = resolver.resolve()
  File "/usr/local/lib/python3.6/dist-packages/pipenv/utils.py", line 385, in resolve
    results = self.resolver.resolve(max_rounds=environments.PIPENV_MAX_ROUNDS)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
    has_changed, best_matches = self._resolve_one_round()
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/piptools/resolver.py", line 206, in _resolve_one_round
    for dep in self._iter_dependencies(best_match):
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/piptools/resolver.py", line 301, in _iter_dependencies
    dependencies = self.repository.get_dependencies(ireq)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 234, in get_dependencies
    legacy_results = self.get_legacy_dependencies(ireq)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 426, in get_legacy_dependencies
    results, ireq = self.resolve_reqs(download_dir, ireq, wheel_cache)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 297, in resolve_reqs
    results = resolver._resolve_one(reqset, ireq)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/notpip/_internal/resolve.py", line 260, in _resolve_one
    abstract_dist = self._get_abstract_dist_for(req_to_install)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/notpip/_internal/resolve.py", line 213, in _get_abstract_dist_for
    self.require_hashes
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 294, in prepare_linked_requirement
    abstract_dist.prep_for_dist(finder, self.build_isolation)
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/notpip/_internal/operations/prepare.py", line 127, in prep_for_dist
    self.req.run_egg_info()
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/notpip/_internal/req/req_install.py", line 474, in run_egg_info
    command_desc='python setup.py egg_info')
  File "/usr/local/lib/python3.6/dist-packages/pipenv/patched/notpip/_internal/utils/misc.py", line 705, in call_subprocess
    % (command_desc, proc.returncode, cwd))
pipenv.patched.notpip._internal.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmp_2psbq_0build/pycocotools/
(n_project_bone) endo@ohmasa-com:~/works/codes/n_project_bone$ 

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:10 (2 by maintainers)

github_iconTop GitHub Comments

3reactions
jtanioscommented, Mar 28, 2020

@themummy Also having this issue while trying to install tensorflow==2.0.0 with pipenv. With pip I can install without issue, but pipenv raise this error while trying to lock the pipfile. Any workarounds for now?

@sconetto Installing pipenv from master solved the issue for me: pip install git+https://github.com/pypa/pipenv.git@master

1reaction
rbbernardinocommented, Apr 26, 2020

@jtanios awesome! I was facing the same issue: just tensorflow 2.0 and after I upgraded my pipenv to master, the issue was gone!

Read more comments on GitHub >

github_iconTop Results From Across the Web

41 - Stack Overflow
Below is the result of running the command pipenv install opencv-python on a recent linux (5.4.0 x64) system. Locking [packages] dependencies… self.repository.
Read more >
How to Fix 'Python Setup.py egg_info' Failed with Error Code 1
This article gives you four easy methods to help with Command 'python setup.py egg_info' failed with error code 1. Suppose you lost your...
Read more >
Python Setup.py egg_info Failed with Error Code 1? [Fixed]
Are you troubled by the command "python setup.py egg_info" failed with error code 1? Don't worry. This post explores several effective fixes ...
Read more >
Command python setup py egg info failed with error ... - Edureka
Hi Guys, I am trying to install jupyter in my Windows system, but It shows me the below error ... \AppData\Local\Temp\ How can...
Read more >
pip9.exceptions.InstallationError Command "python setup.py ...
Command "python setup.py egg_info" failed with error code 1 in /tmp/. ... dist-packages/pipenv/patched/notpip/req/req_set.py", line 644, in ...
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