I got the following error installing a dependency with pip
:
pip9.exceptions.InstallationError Command "python setup.py egg_info" failed with error code 1 in /tmp/tmpoons7qgkbuild/opencv-python/
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.get_dependencies(ireq):
File "/usr/lib/python3/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 174, in get_dependencies
legacy_results = self.get_legacy_dependencies(ireq)
File "/usr/lib/python3/dist-packages/pipenv/patched/piptools/repositories/pypi.py", line 222, in get_legacy_dependencies
result = reqset._prepare_file(self.finder, ireq, ignore_requires_python=True)
File "/usr/lib/python3/dist-packages/pipenv/patched/notpip/req/req_set.py", line 644, in _prepare_file
abstract_dist.prep_for_dist()
File "/usr/lib/python3/dist-packages/pipenv/patched/notpip/req/req_set.py", line 134, in prep_for_dist
self.req_to_install.run_egg_info()
File "/usr/lib/python3/dist-packages/pipenv/vendor/pip9/req/req_install.py", line 435, in run_egg_info
call_subprocess(
File "/usr/lib/python3/dist-packages/pipenv/vendor/pip9/utils/__init__.py", line 705, in call_subprocess
raise InstallationError(
pip9.exceptions.InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/tmpoons7qgkbuild/opencv-python/
Follow the below steps to install the Setuptools package on Linux using the setup.py file: Step 1: Download the latest source package of Setuptools for Python3 from the website. Step 3: Go to the setuptools-60.5. 0 folder and enter the following command to install the package.
If it is missing, then use the following code to install it - pip install ez_setup. Then type in this code- pip install unroll. If all this does not work, then maybe pip did not install or upgrade setup_tools properly. In that case, you can try this code: easy_install -U setuptools.
Step 1: Install the latest or current version of Python3 in Windows. Step 2: Now check if pip and python are correctly installed in your system using the following commands. Step 3: Upgrade pip to the latest version to avoid errors during installation.
pip9.exceptions.InstallationError
Make sure the version of your pip
and setuptools
is sufficient for manylinux2014 wheels
.
A) System Install
sudo python3 -m pip install -U pip
sudo python3 -m pip install -U setuptools
B) Virtual Env / Pipenv
# Within the venv
pip3 install -U pip
pip3 install -U setuptools
For me, python setup.py egg_info
probably failed because of a recent change in python wheels, as manylinux1 wheels
were replaced by manylinux2014 wheels
according to open-cv faq.
I solved a similar issue following this link https://www.edureka.co/community/69396/command-python-setup-info-failed-error-build-8nhf9w2t-grpcio and using the following command:
$ pip3 install --upgrade setuptools
$ pip3 install --upgrade pip
I just ran into a similar problem when trying to install the Google Cloud Platform package for BigQuery on Python 3.6 which was throwing me the following error: (couldn't copy and paste before I lost it, so this is a approximation of the exact error I got)
[...]InstallationError: Command "python setup.py egg_info" failed with error code 1 in /tmp/<some_folder>/grpcio/
And after following other threads with the most recommended options to upgrade the setuptools, not using the cached packages, using the local user option, etc... Nothing worked
python3 -m pip install --user --no-cache-dir google-cloud-bigquery
python3 -m pip install --upgrade setuptools
Then, when looking a bit more carefully into the actual error message, I could see that the failing line was also referring to what I thought may be another dependency package: grpcio
So sure enought, I thought about trying also to upgrade or re-install that grpcio package and see what would happen.
I tried first with just upgrading that package:
python3 -m pip install --no-cache-dir --user --upgrade grpcio
And it did upgrade fine. So next I tried to upgrade the google-cloud-bigquery package again, and this time around it also worked perfectly and that solved the problem!
So basically it seems that ensuring the whole dependency chain is available and installed properly may do the trick as well, which makes total sense when you think about it
I hope this helps some people.
I hava a same problem.
When I execute:
pip install jupyterlab
it throw an error:
Command "python setup.py egg_info" failed with error code 1 in /private/tmp/pip-build-p0u6Wd/jupyterlab
I try many ways, they all failed.
Finaly, I find there is an anther pip in my computer:
$ pip --version
pip 6.1.1 from /Library/Python/2.7/site-packages (python 2.7)
$ pip3 --version
pip 21.2.4 from /usr/local/lib/python3.9/site-packages/pip (python 3.9)
I use pip3
fix the problem:
pip3 install jupyterlab
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With