pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1
See original GitHub issueRunning pipenv --three
is successful, but running pipenv install
encounters this issue:
pip.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1
Environment
- OS Type - macOS Sierra 10.12.6
- Python version:
$ python -V
results toPython 2.7.10
- Pipenv version:
$ pipenv --version
results topipenv, version 9.0.0
- Python 3 is installed:
$ python3 -V
results toPython 3.6.3
- Current project’s virtualenv was initialized as a python 3 project
$ pipenv --three
Expected result
Running pipenv install
should install the dependencies mentioned in the Pipfile.
Actual result
darrenkarlsapalo@Darrens-MBP ~/g/thesis-nltk> pipenv install --verbose
Pipfile.lock not found, creating…
Locking [dev-packages] dependencies…
Locking [packages] dependencies…
Traceback (most recent call last):
File "/usr/local/bin/pipenv", line 11, in <module>
sys.exit(cli())
File "/Library/Python/2.7/site-packages/pipenv/vendor/click/core.py", line 722, in __call__
return self.main(*args, **kwargs)
File "/Library/Python/2.7/site-packages/pipenv/vendor/click/core.py", line 697, in main
rv = self.invoke(ctx)
File "/Library/Python/2.7/site-packages/pipenv/vendor/click/core.py", line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/Library/Python/2.7/site-packages/pipenv/vendor/click/core.py", line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/Library/Python/2.7/site-packages/pipenv/vendor/click/core.py", line 535, in invoke
return callback(*args, **kwargs)
File "/Library/Python/2.7/site-packages/pipenv/cli.py", line 1859, in install
do_init(dev=dev, allow_global=system, ignore_pipfile=ignore_pipfile, system=system, skip_lock=skip_lock, verbose=verbose, concurrent=concurrent, deploy=deploy, pre=pre)
File "/Library/Python/2.7/site-packages/pipenv/cli.py", line 1308, in do_init
do_lock(system=system, pre=pre)
File "/Library/Python/2.7/site-packages/pipenv/cli.py", line 1099, in do_lock
pre=pre
File "/Library/Python/2.7/site-packages/pipenv/utils.py", line 545, in resolve_deps
resolved_tree = actually_resolve_reps(deps, index_lookup, markers_lookup, project, sources, verbose, clear, pre)
File "/Library/Python/2.7/site-packages/pipenv/utils.py", line 507, in actually_resolve_reps
resolved_tree.update(resolver.resolve(max_rounds=PIPENV_MAX_ROUNDS))
File "/Library/Python/2.7/site-packages/pipenv/patched/piptools/resolver.py", line 102, in resolve
has_changed, best_matches = self._resolve_one_round()
File "/Library/Python/2.7/site-packages/pipenv/patched/piptools/resolver.py", line 200, in _resolve_one_round
for dep in self._iter_dependencies(best_match):
File "/Library/Python/2.7/site-packages/pipenv/patched/piptools/resolver.py", line 296, in _iter_dependencies
dependencies = self.repository.get_dependencies(ireq)
File "/Library/Python/2.7/site-packages/pipenv/patched/piptools/repositories/pypi.py", line 153, in get_dependencies
result = reqset._prepare_file(self.finder, ireq)
File "/Library/Python/2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 639, in _prepare_file
abstract_dist.prep_for_dist()
File "/Library/Python/2.7/site-packages/pipenv/patched/pip/req/req_set.py", line 134, in prep_for_dist
self.req_to_install.run_egg_info()
File "/Library/Python/2.7/site-packages/pipenv/patched/pip/req/req_install.py", line 438, in run_egg_info
command_desc='python setup.py egg_info')
File "/Library/Python/2.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/kg/mj08s20n06n21p8ln8108c2c0000gn/T/tmp6NVclhbuild/subprocess32/
Steps to replicate
Running pipenv install
in the project directory.
Contents of Pipfile
[[source]]
url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"
[dev-packages]
[packages]
requests = "*"
nltk = "*"
matplotlib = "*"
My guess
I’m guessing that the complication might be caused by having two Python interpreters installed: Mac OS’ default python and the 3.6 that I installed. I’m just not sure how to fix this problem anymore because googling the problem didn’t result to any useful responses.
Similar search results based on error message
Some encounter problems while attempting to install a package (e.g. running pip install flask-mysql
) but I have no problems running pip3 install requests nltk matplotlib
.
Another similar result showed problems when it came to installing gitsome but again, my issue is running pipenv install
.
Attempting to install them using pip install nltk matplotlib
results to the following:
darrenkarlsapalo@Darrens-MBP ~/g/thesis-nltk> pip install nltk matplotlib
Requirement already satisfied: nltk in /Library/Python/2.7/site-packages
Requirement already satisfied: matplotlib in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python
Requirement already satisfied: six in /Library/Python/2.7/site-packages (from nltk)
Requirement already satisfied: numpy>=1.5 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib)
Requirement already satisfied: python-dateutil in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib)
Collecting tornado (from matplotlib)
Downloading tornado-4.5.2.tar.gz (483kB)
100% |████████████████████████████████| 491kB 595kB/s
Requirement already satisfied: pyparsing>=1.5.6 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from matplotlib)
Collecting nose (from matplotlib)
Downloading nose-1.3.7-py2-none-any.whl (154kB)
100% |████████████████████████████████| 163kB 640kB/s
Collecting singledispatch (from tornado->matplotlib)
Downloading singledispatch-3.4.0.3-py2.py3-none-any.whl
Requirement already satisfied: certifi in /Library/Python/2.7/site-packages (from tornado->matplotlib)
Collecting backports_abc>=0.4 (from tornado->matplotlib)
Downloading backports_abc-0.5-py2.py3-none-any.whl
Building wheels for collected packages: tornado
Running setup.py bdist_wheel for tornado ... done
Stored in directory: /Users/darrenkarlsapalo/Library/Caches/pip/wheels/b3/47/3a/96e12476829cb196adabc879fedb72f1bb2c8613b6961e78e7
Successfully built tornado
Installing collected packages: singledispatch, backports-abc, tornado, nose
Exception:
Traceback (most recent call last):
File "/Library/Python/2.7/site-packages/pip/basecommand.py", line 215, in main
status = self.run(options, args)
File "/Library/Python/2.7/site-packages/pip/commands/install.py", line 342, in run
prefix=options.prefix_path,
File "/Library/Python/2.7/site-packages/pip/req/req_set.py", line 784, in install
**kwargs
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 851, in install
self.move_wheel_files(self.source_dir, root=root, prefix=prefix)
File "/Library/Python/2.7/site-packages/pip/req/req_install.py", line 1064, in move_wheel_files
isolated=self.isolated,
File "/Library/Python/2.7/site-packages/pip/wheel.py", line 377, in move_wheel_files
clobber(source, dest, False, fixer=fixer, filter=filter)
File "/Library/Python/2.7/site-packages/pip/wheel.py", line 316, in clobber
ensure_dir(destdir)
File "/Library/Python/2.7/site-packages/pip/utils/__init__.py", line 83, in ensure_dir
os.makedirs(path)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 150, in makedirs
makedirs(head, mode)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 1] Operation not permitted: '/System/Library/Frameworks/Python.framework/Versions/2.7/man'
While running pip3 install requests nltk matplotlib
has no problems.
darrenkarlsapalo@Darrens-MBP ~/g/thesis-nltk> pip3 install requests nltk matplotlib
Requirement already satisfied: requests in /usr/local/lib/python3.6/site-packages
Requirement already satisfied: nltk in /usr/local/lib/python3.6/site-packages
Requirement already satisfied: matplotlib in /usr/local/lib/python3.6/site-packages
Requirement already satisfied: idna<2.7,>=2.5 in /usr/local/lib/python3.6/site-packages (from requests)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests)
Requirement already satisfied: urllib3<1.23,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests)
Requirement already satisfied: six in /usr/local/lib/python3.6/site-packages (from nltk)
Requirement already satisfied: cycler>=0.10 in /usr/local/lib/python3.6/site-packages (from matplotlib)
Requirement already satisfied: python-dateutil>=2.0 in /usr/local/lib/python3.6/site-packages (from matplotlib)
Requirement already satisfied: numpy>=1.7.1 in /usr/local/lib/python3.6/site-packages (from matplotlib)
Requirement already satisfied: pytz in /usr/local/lib/python3.6/site-packages (from matplotlib)
Requirement already satisfied: pyparsing!=2.0.4,!=2.1.2,!=2.1.6,>=2.0.1 in /usr/local/lib/python3.6/site-packages (from matplotlib)
Please guide me on how I can help you help me. Thank you for your time.
Issue Analytics
- State:
- Created 6 years ago
- Reactions:3
- Comments:17 (7 by maintainers)
Top GitHub Comments
@darrensapalo do you have pipenv installed via homebrew? If not I would recommend you run
pip uninstall pipenv
and reinstall withpip3 install pipenv
– since you mention installation works with python3, but your error message is related to using the pipenv dependency resolver (which by default runs using the python version which is used to install pipenv), this issue can possibly be resolved by simply using python 3 to install pipenv. Let me know if that helps!@techalchemy while I agree that I never described what is broken, I thought I didn’t have to, since it’s exactly the same problem as the OP:
Do you still think that it’s worth a new issue?