Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

"pip install unroll": "python setup.py egg_info" failed with error code 1

I'm new to Python and have been trying to install some packages with pip.

But pip install unroll gives me

Command "python setup.py egg_info" failed with error code 1 in C:\Users\MARKAN~1\AppData\Local\Temp\pip-build-wa7uco0k\unroll\

How can I solve this?

like image 861
benjaminh Avatar asked Mar 14 '16 15:03

benjaminh


People also ask

What is pip install unroll?

The pip install unroll error is raised possibly as your setuptools are not installed. For proper installation, you can follow the installation instructions from the PyPI website. But first, check out the version of Python which you are running.

How do I install Python Setuptools?

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.

How do I upgrade setup py?

Installing Setuptools on WindowsStep 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.


3 Answers

About the error code

According to the Python documentation:

This module makes available standard errno system symbols. The value of each symbol is the corresponding integer value. The names and descriptions are borrowed from linux/include/errno.h, which should be pretty all-inclusive.

Error code 1 is defined in errno.h and means Operation not permitted.

About your error

Your setuptools do not appear to be installed. Just follow the Installation Instructions from the PyPI website.

If it's already installed, try

pip install --upgrade setuptools

If it's already up to date, check that the module ez_setup is not missing. If it is, then

pip install ez_setup

Then try again

pip install unroll

If it's still not working, maybe pip didn't install/upgrade setup_tools properly so you might want to try

easy_install -U setuptools

And again

pip install unroll
like image 142
pixis Avatar answered Oct 16 '22 02:10

pixis


Here's a little guide explaining a little bit how I usually install new packages on Python + Windows. It seems you're using Windows paths, so this answer will stick to that particular SO:

  • I never use a system-wide Python installation. I only use virtualenvs, and usually I try to have the latest version of 2.x & 3.x.
  • My first attempt is always doing pip install package_i_want in some of my Visual Studio command prompts. What Visual Studio command prompt? Well, ideally the Visual Studio which matches the one which was used to build Python. For instance, let's say your Python installation says Python 2.7.11 (v2.7.11:6d1b6a68f775, Dec 5 2015, 20:40:30) [MSC v.1500 64 bit (AMD64)] on win32. The version of Visual Studio used to compile Python can be found here, so v1500 means I'd be using vs2008 x64 command prompt
  • If the previous step failed for some reason I just try using easy_install package_i_want
  • If the previous step failed for some reason I go to gohlke website and I check whether my package is available over there. If it's so, I'm lucky, I just download it into my virtualenv and then I just go to that location using a command prompt and I do pip install package_i_want.whl
  • If the previous step didn't succeed I'll just try to build the wheel myself and once it's generated I'll try to install it with pip install package_i_want.whl

Now, if we focus in your specific problem, where you're having a hard time installing the unroll package. It seems the fastest way to install it is doing something like this:

  • git clone https://github.com/Zulko/unroll
  • cd unroll && python setup.py bdist_wheel
  • Copy the generated unroll-0.1.0-py2-none-any.whl file from the created dist folder into your virtualenv.
  • pip install unroll-0.1.0-py2-none-any.whl

That way it will install without any problems. To check it really works, just login into the Python installation and try import unroll, it shouldn't complain.

One last note: This method works almost 99% of the time, and sometimes you'll find some pip packages which are specific to Unix or Mac OS X, in that case, when that happens I'm afraid the best way to get a Windows version is either posting some issues to the main developers or having some fun by yourself porting to Windows (typically a few hours if you're not lucky) :)

like image 41
BPL Avatar answered Oct 16 '22 01:10

BPL


It was resolved after upgrading pip:

python -m pip install --upgrade pip
pip install "package-name"
like image 67
Lil Ari Avatar answered Oct 16 '22 01:10

Lil Ari