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

ere’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) 🙂

Leave a Comment