Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

pip error while installing package in Cygwin/Python2.7

Tags:

python

cygwin

I installed Python2.7.3 in Cygwin using this guide, I then installed pip from source.

When I try to use pip:

$ pip install sqlalchemy
Downloading/unpacking sqlalchemy
Downloading SQLAlchemy-0.7.8.tar.gz (2.6Mb): 2.6Mb downloaded
Running setup.py egg_info for package sqlalchemy
  137 [main] python2.7 1060 child_info_fork::abort: address space needed by 'itertools.dll' (0x2C0000) is already occupied
  Error [Errno 11] Resource temporarily unavailable while executing command python setup.py egg_info
Exception:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/basecommand.py", line 104, in main
  status = self.run(options, args)
File "/usr/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/commands/install.py", line 245, in run
  requirement_set.prepare_files(finder, force_root_egg_info=self.bundle, bundle=self.bundle)
File "/usr/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 1009, in prepare_files
  req_to_install.run_egg_info()
File "/usr/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/req.py", line 225, in run_egg_info
  command_desc='python setup.py egg_info')
File "/usr/local/lib/python2.7/site-packages/pip-1.1-py2.7.egg/pip/__init__.py", line 221, in call_subprocess
  cwd=cwd, env=env)
File "/usr/local/lib/python2.7/subprocess.py", line 679, in __init__
  errread, errwrite)
File "/usr/local/lib/python2.7/subprocess.py", line 1143, in _execute_child
  self.pid = os.fork()
OSError: [Errno 11] Resource temporarily unavailable

Storing complete log in /home/joshfriend/.pip/pip.log

Found a guide noting that this happens, and said that running rebaseall should fix this. I tried, and it didn't. I would assume that this is because I did not install python2.7 with the cygwin installer and therefore was not affected by the rebaseall.

UPDATE:

I gave the wrong link to the instructions I used to install python (sorry). I went back and fixed my explanation of what I did...

like image 231
Josh Avatar asked Aug 16 '12 15:08

Josh


People also ask

Does pip work with python2?

To use pip, first install a custom version of Python 2. pip is then installed with it. You can then use the pip command to create a virtualenv and install modules.

How do I fix pip installation not working?

A “pip: command not found” error occurs when you fail to properly install the package installer for Python (pip) needed to run Python on your computer. To fix it, you will either need to re-install Python and check the box to add Python to your PATH or install pip on your command line.

How do I install Python packages in Cygwin?

If you choose to install a Python package not included in Cygwin, use setuptools with EasyInstall. Install setuptools and download a Python module package, then type the following command: "easy_install /my_downloads/OtherPackage-3.2. 1-py2.


1 Answers

You can't just "run rebaseall" the way the site you link to implies. You need to do the following:

  1. Exit all running Cygwin programs. Yes, all of them, even your shell, even MinTTY, even X11.
  2. Start > Run > C:\cygwin\bin\ash.exe > OK.
  3. cd /bin
  4. Type ./rebaseall and press Return.
  5. That may take a few minutes. Go get a coffee.
  6. Come back, try again.

I've no idea how apt-cyg works, but it appears to use the standard Cygwin repositories. Unless you have very good reason to do otherwise, I'd use the standard Cygwin setup.exe installer for all your install/upgrade/whatever needs, as it does a pretty good job of doing all your rebasing for you.

In particular, if the above steps don't work, I'd uninstall Python with apt-cyg, and try again by installing it with the standard installer. You can download it again from cygwin.com if you need to.

like image 77
me_and Avatar answered Nov 16 '22 03:11

me_and