Python egg info install

pip install gives «Command «python setup.py egg_info» failed with error code 1″

Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-EuOI6K/unroll/ 

The same thing happens with other packages, like pip install unroll , or using pip2 . I thought this post was the same issue, but there it gets resolved by using sudo.

Solutions tried

I tried solutions in this post, like: pip install —upgrade setuptools , (sudo) easy_install -U setuptools , or sudo apt-get install python-setuptools , but to no avail.

python/pip info

sudo which python pip pip2 | xargs -rd '\n' readlink -f /usr/bin/python2.7 /usr/local/bin/pip /usr/local/bin/pip2 sudo python --version Python 2.7.12 sudo pip --version pip 9.0.1 from /home/matifou/.local/lib/python2.7/site-packages (python 2.7) /usr/bin/pip2 --version pip 8.1.1 from /usr/lib/python2.7/dist-packages (python 2.7) ls -l $(which pip); dpkg -S /usr/bin/pip -rwxr-xr-x 1 root root 204 Nov 8 16:24 /usr/local/bin/pip python-pip: /usr/bin/pip 

Full error output

pip install rpy2==2.2.7 Collecting rpy2==2.2.7 Using cached rpy2-2.2.7.tar.gz Complete output from command python setup.py egg_info: running egg_info creating pip-egg-info/rpy2.egg-info writing pip-egg-info/rpy2.egg-info/PKG-INFO writing top-level names to pip-egg-info/rpy2.egg-info/top_level.txt writing dependency_links to pip-egg-info/rpy2.egg-info/dependency_links.txt writing manifest file 'pip-egg-info/rpy2.egg-info/SOURCES.txt' Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-EkrbmM/rpy2/setup.py", line 462, in [os.path.join('doc', 'source', 'rpy2_logo.png')])], File "/usr/lib/python2.7/distutils/core.py", line 151, in setup dist.run_commands() File "/usr/lib/python2.7/distutils/dist.py", line 953, in run_commands self.run_command(cmd) File "/usr/lib/python2.7/distutils/dist.py", line 972, in run_command cmd_obj.run() File "/usr/local/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 280, in run self.find_sources() File "/usr/local/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 295, in find_sources mm.run() File "/usr/local/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 526, in run self.add_defaults() File "/usr/local/lib/python2.7/dist-packages/setuptools/command/egg_info.py", line 562, in add_defaults sdist.add_defaults(self) File "/usr/local/lib/python2.7/dist-packages/setuptools/command/py36compat.py", line 36, in add_defaults self._add_defaults_ext() File "/usr/local/lib/python2.7/dist-packages/setuptools/command/py36compat.py", line 119, in _add_defaults_ext build_ext = self.get_finalized_command('build_ext') File "/usr/lib/python2.7/distutils/cmd.py", line 312, in get_finalized_command cmd_obj.ensure_finalized() File "/usr/lib/python2.7/distutils/cmd.py", line 109, in ensure_finalized self.finalize_options() File "/tmp/pip-build-EkrbmM/rpy2/setup.py", line 155, in finalize_options config += get_rconfig(r_home, about) File "/tmp/pip-build-EkrbmM/rpy2/setup.py", line 319, in get_rconfig rc = RConfig.from_string(rconfig, allow_empty = allow_empty) File "/tmp/pip-build-EkrbmM/rpy2/setup.py", line 279, in from_string + '\nin string\n' + string) ValueError: Invalid substring -fopenmp in string -Wl,--export-dynamic -fopenmp -Wl,-Bsymbolic-functions -Wl,-z,relro -L/usr/lib/R/lib -lR -lpcre -llzma -lbz2 -lz -lrt -ldl -lm Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-build-EkrbmM/rpy2/ pip install unroll Collecting unroll Using cached unroll-0.1.0.tar.gz Complete output from command python setup.py egg_info: Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz Traceback (most recent call last): File "", line 1, in File "/tmp/pip-build-QimGjp/unroll/setup.py", line 2, in ez_setup.use_setuptools() File "/usr/local/lib/python2.7/dist-packages/ez_setup.py", line 145, in use_setuptools return _do_download(version, download_base, to_dir, download_delay) File "/usr/local/lib/python2.7/dist-packages/ez_setup.py", line 124, in _do_download to_dir, download_delay) File "/usr/local/lib/python2.7/dist-packages/ez_setup.py", line 193, in download_setuptools src = urlopen(url) File "/usr/lib/python2.7/urllib2.py", line 154, in urlopen return opener.open(url, data, timeout) File "/usr/lib/python2.7/urllib2.py", line 435, in open response = meth(req, response) File "/usr/lib/python2.7/urllib2.py", line 548, in http_response 'http', request, response, code, msg, hdrs) File "/usr/lib/python2.7/urllib2.py", line 473, in error return self._call_chain(*args) File "/usr/lib/python2.7/urllib2.py", line 407, in _call_chain result = func(*args) File "/usr/lib/python2.7/urllib2.py", line 556, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 403: SSL is required Command "python setup.py egg_info" failed with error code 1 in tmp/pip- build-QimGjp/unroll/

Источник

Читайте также:  All about css selectors

Setup.py egg_info failed with error code 1 | Resolved

Today, let us see the different methods followed by our Support Techs to resolve it.

Method 1: Check if Pip and Setuptools Are Installed Correctly

PIP and Setuptools are python package managers.

They help you add external libraries, packages, and already written code in your python program.

If missing or installed incorrectly, these tools can cause the command to fail with error code 1.

Therefore, you need to check if both PIP and Setuptools are installed correctly in your system.

Follow the below steps to check if PIP and Setuptools are install correctly on your computer.

Step 1: Firstly, open Command Line Interface (CMD) on your computer.

You can do that by pressing Windows + R key, which will open the Run window. In the Run window, type CMD and press the Enter key.

Step 2: In CMD, enter the command pip list.

Running pip list will enlist if you have pip and setuptools installed and their version numbers.

Once you see both pip and setuptools installed from the pip list command, you must compare the version numbers.

Make sure that both have their latest version installed on your computer. If the version is old, follow the upcoming methods to upgrade both pip and setuptools.

Method 2. Upgrade Pip to Fix “Python Setup.py egg_info”

The previous method showed you how to check if PIP is installed on your computer.

Furthermore, if you have PIP installed but with an older version, then there is a high chance that you are facing the command “python setup.py egg_info” failing with error code 1.

Therefore, you need to upgrade the PIP on your computer.

You can easily upgrade PIP on your computer and fix the command “python setup.py egg_info,” which failed with error code 1, by following the below steps.

Step 1: Firstly, open Command Line Interface (CMD) on your computer.

You can do that by pressing Windows + R key, which will open the Run window. In the Run window, type CMD and press the Enter key.

Читайте также:  Swing used in java

Step 2: In CMD, type python -m pip install -U pip.

Running the command will upgrade the PIP package installed on your computer.

After PIP is upgraded, you can go ahead and install python packages without facing the command “python setup.py egg_info” failed with error code 1 issue.

Method 3: Upgrade Setuptools to Fix “Python Setup.py egg_info”

Setuptools package manager needs similar care as the pip python package manager.

If you found from method 1 in this article that you are running an old version of Setuptools, you need to update it to get rid of the command “python setup.py egg_info,” which failed with error code 1.

Follow the below steps to upgrade Setuptools on your computer.

Step 1: Open Command Line Interface (CMD) on your computer.

You can do that by pressing Windows + R key, which will open the Run window. In the Run window, type CMD and press the Enter key.

Step 2: In CMD, type pip install -upgrade setuptools.

After running the above command, your system will upgrade the Setuptools package.

You can now install other packages without facing the command “python setup.py egg_info,” which failed with the error code 1 issue.

Method 4: Try to Install the ez_setup

One major cause of the command “python setup.py egg_info” failing with error code 1 is due to the missing ez_setup module in your computer.

Using pip package manager, you can easily install the ez_setup.

Follow the below steps to install the ez_setup on your computer using the pip package manager of python.

Step 1: Open Command Line Interface (CMD) on your computer.

You can do that by pressing Windows + R key, which will open the Run window. Then, in the Run window, type CMD and press the Enter key.

Step 2: In CMD, type the command pip install ez_setup

After that, the ez_setup module will work on your computer.

Next, try to install new python packages, and hopefully, you won’t face the command “python setup.py egg_info” failing with the error code 1 issue.

Conclusion

To wrap up, our Support Engineers demonstrated a quick fix for resolving the setup.py egg_info failed with error code 1. We also learned about the root cause behind this specific error.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

5 Comments

Hello, I’m getting this error when trying to build a Docker image on Linux OS. I tried above steps in dockerfile ut still get the same error.
Complete output from command python setup.py egg_info:
#19 19.69 Traceback (most recent call last):
#19 19.69 File “”, line 1, in
#19 19.69 File “/tmp/pip-build-BdlTEJ/pandas/setup.py”, line 250
#19 19.69 f”-source file ‘’ not found.\n”
#19 19.69 ^
#19 19.69 SyntaxError: invalid syntax
#19 19.69
#19 19.69 —————————————-
#19 19.88 Command “python setup.py egg_info” failed with error code 1 in /tmp/pip-build-BdlTEJ/pandas/
#19 20.65 You are using pip version 8.1.2, however version 22.3.1 is available.
#19 20.65 You should consider upgrading via the ‘pip install –upgrade pip’ command. Any suggestions Reply

Читайте также:  Как сделать цикл for бесконечным python

Hi ,
Our experts can help you with the issue.Please contact our support team via live chat(click on the icon at right-bottom). Reply

Hi,
Really need help. My system gives me a stack of urls while install unroll. Like “pip install unroll”. Please help me. Reply

Hi, I need help. I am installing unroll using commond “pip install unroll”. But it gives me a stack of urls errors given below. I have updated everything but It doesn’t work. C:\Windows\System32>pip install unroll
Collecting unroll
Using cached unroll-0.1.0.tar.gz (7.3 kB)
Preparing metadata (setup.py) … error
error: subprocess-exited-with-error × python setup.py egg_info did not run successfully.
│ exit code: 1
╰─> [32 lines of output]
Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz
Traceback (most recent call last):
File “C:\Windows\System32\venv\lib\site-packages\ez_setup.py”, line 143, in use_setuptools
raise ImportError
ImportError During handling of the above exception, another exception occurred: Traceback (most recent call last):
File “”, line 2, in
File “”, line 34, in
File “C:\Users\Developer\AppData\Local\Temp\pip-install-pizv754q\unroll_dcbce8047706455a8010751864565182\setup.py”, line 2, in
ez_setup.use_setuptools()
File “C:\Windows\System32\venv\lib\site-packages\ez_setup.py”, line 145, in use_setuptools
return _do_download(version, download_base, to_dir, download_delay)
File “C:\Windows\System32\venv\lib\site-packages\ez_setup.py”, line 123, in _do_download
tarball = download_setuptools(version, download_base,
File “C:\Windows\System32\venv\lib\site-packages\ez_setup.py”, line 193, in download_setuptools
src = urlopen(url)
File “C:\Users\Developer\AppData\Local\Programs\Python\Python310\lib\urllib\request.py”, line 216, in urlopen
return opener.open(url, data, timeout)
File “C:\Users\Developer\AppData\Local\Programs\Python\Python310\lib\urllib\request.py”, line 525, in open
response = meth(req, response)
File “C:\Users\Developer\AppData\Local\Programs\Python\Python310\lib\urllib\request.py”, line 634, in http_response
response = self.parent.error(
File “C:\Users\Developer\AppData\Local\Programs\Python\Python310\lib\urllib\request.py”, line 563, in error
return self._call_chain(*args)
File “C:\Users\Developer\AppData\Local\Programs\Python\Python310\lib\urllib\request.py”, line 496, in _call_chain
result = func(*args)
File “C:\Users\Developer\AppData\Local\Programs\Python\Python310\lib\urllib\request.py”, line 643, in http_error_default
raise HTTPError(req.full_url, code, msg, hdrs, fp)
urllib.error.HTTPError: HTTP Error 403: SSL is required
[end of output] note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed × Encountered error while generating package metadata.
╰─> See above for output. note: This is an issue with the package mentioned above, not pip.
hint: See above for details. Reply

Hi Muhammad,
Our experts can help you with the issue.we will be happy to talk to you through our live chat(click on the icon at right-bottom). Reply

Источник

Оцените статью