创建新的virtualenv会导致错误

时间:2009-12-21 18:53:10

标签: python virtualenv

我正在努力让virtualenv在我的机器上工作。我正在使用python2.6,在安装pip之后,使用pip安装virtualenv,运行“virtualenv --no-site-packages cyclesg”会产生以下结果:

New python executable in cyclesg/bin/python
Installing setuptools....
  Complete output from command /home/nubela/Workspace/cyclesg...ython -c "#!python
\"\"\"Bootstrap setuptoo...




" /usr/lib/python2.6/site-packag...6.egg:
  error: invalid Python installation: unable to open /home/nubela/Workspace/cyclesg_dep/cyclesg/include/multiarch-i386-linux/python2.6/pyconfig.h (No such file or directory)
----------------------------------------
...Installing setuptools...done.
New python executable in cyclesg/bin/python
Installing setuptools....
  Complete output from command /home/nubela/Workspace/cyclesg...ython -c "#!python
\"\"\"Bootstrap setuptoo...




" /usr/lib/python2.6/site-packag...6.egg:
  error: invalid Python installation: unable to open /home/nubela/Workspace/cyclesg_dep/cyclesg/include/multiarch-i386-linux/python2.6/pyconfig.h (No such file or directory)
----------------------------------------
...Installing setuptools...done.

知道如何解决这个问题吗?谢谢!

2 个答案:

答案 0 :(得分:2)

你是在mandriva吗?

为了支持multilib(混合x86 / x86_64),Mandriva搞砸了你的python安装。他们修补了python,打破了virtualenv;而不是修复python,他们然后继续修补virtualenv。如果你使用从pip安装的自己的virtualenv,这是没用的。

以下是错误:https://qa.mandriva.com/show_bug.cgi?id=42808

答案 1 :(得分:0)

您使用的是基于Linux的系统吗?看起来virtualenv正在尝试构建一个新的python exectable但无法找到要执行此操作的文件。尝试安装python-dev包。