在Cygwin/Python2.7中安装软件包时出现pip错误

Jos*_*osh 5 python cygwin

我使用我在这里找到的指南在Cygwin中安装了Python2.7.3:http: //www.tux.org/~mayer/cygwin/python/index.html然后我从源代码安装了pip.

当我尝试使用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
Run Code Online (Sandbox Code Playgroud)

这个网站注意到这种情况发生了,并说运行"rebaseall"应该解决这个问题.我试过了,但事实并非如此.我认为这是因为我没有使用cygwin安装程序安装python2.7,因此不受"rebaseall"的影响.

更新:

我给出了用于安装python的说明错误的链接(抱歉).我回去修理了我所做的解释......

me_*_*and 11

您不能只是"运行rebaseall"您链接的网站所暗示的方式.您需要执行以下操作:

  1. 退出所有正在运行的Cygwin程序.是的,所有这些,甚至是你的shell,甚至是MinTTY,甚至是X11.
  2. 开始>运行C:\cygwin\bin\ash.exe>>确定.
  3. cd /bin
  4. 输入./rebaseall并按Return.
  5. 这可能需要几分钟.去喝杯咖啡吧
  6. 回来,再试一次.

我不知道它是如何apt-cyg工作的,但似乎使用标准的Cygwin存储库.除非您有充分的理由不这样做,否则我会使用标准的Cygwin setup.exe安装程序来满足您的所有安装/升级/任何需求,因为它可以很好地为您完成所有的基础设置.

特别是,如果上述步骤不起作用,我将卸载Python apt-cyg,并再次使用标准安装程序安装它.如果需要,您可以从cygwin.com再次下载.