views:

217

answers:

2

Hi,

I'm trying to get virtualenv to work on my machine. I'm using python2.6, and after installing pip, and using pip to install virtualenv, running "virtualenv --no-site-packages cyclesg" results in the following:

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.

Any idea how I can remedy this? Thanks!

A: 

Are you on a linux based system? It looks like virtualenv is trying to build a new python exectable but can't find the files to do that. Try installing the python-dev package.

nbv4
+2  A: 

Are you on mandriva?

In order to support multilib (mixing x86/x86_64) Mandriva messes up your python installation. They patched python, which breaks virtualenv; instead of fixing python, they then proceeded to patch virtualenv. This is useless if you are using your own virtualenv installed from pip.

Here is the bug: https://qa.mandriva.com/show_bug.cgi?id=42808

Tobu
Yes I am on Mandriva! Is there a workaround for it? I'm on 2009.1, and the workaround demonstrated is for python2.5 and 2009.0.
nubela
The wrapper script workaround at https://qa.mandriva.com/show_bug.cgi?id=42808#c7 is okay. Just don't call the script virtualenv, but something like venv-fix .
Tobu