[Numpy-discussion] Installation problem: numpy1.5.1 + python2.7 + virtualenv-1, 5, 1

Vicent Mas uvemas at gmail.com
Wed Apr 6 15:14:01 EDT 2011

On 2011-04-05 Vicent Mas <uvemas at gmail.com> said:

> Hi,
> I'm trying to install numpy1.5.1 in a virtual environment
> (virtualenv-1.5.1) on my debian testing box. I'm using python 2.7
> installed from a debian package.
> [...]
> Doing the same with python2.6 (also from debian package) works just fine.
> Could somebody tell me what am I doing wrong? Thanks.


it seems that python2.7 packaged by debian is not fully compatible with 
virtualenv-1.5.1. The following changes in /usr/lib/python2.7/sysconfig.py
fix the problem:

vmas at rachael$ diff -u /usr/lib/python2.7/sysconfig.py /tmp/sysconfig.py
--- /usr/lib/python2.7/sysconfig.py     2011-04-06 20:51:00.000000000 +0200
+++ /tmp/sysconfig.py   2011-04-06 20:47:12.000000000 +0200
@@ -294,7 +294,7 @@
 def _get_makefile_filename():
     if _PYTHON_BUILD:
         return os.path.join(_PROJECT_BASE, "Makefile")
-    return os.path.join(get_path('platstdlib').replace("/local","",1), "config" + (sys.pydebug and "_d" or ""), "Makefile")
+    return os.path.join(get_path('platstdlib').replace("/usr/local","/usr",1), "config" + (sys.pydebug and "_d" or ""), "Makefile")
 def _init_posix(vars):
@@ -394,7 +394,7 @@
             inc_dir = _PROJECT_BASE
-        inc_dir = get_path('platinclude').replace("/local","",1)+(sys.pydebug and "_d" or "")
+        inc_dir = get_path('platinclude').replace("/usr/local","/usr",1)+(sys.pydebug and "_d" or "")
     return os.path.join(inc_dir, 'pyconfig.h')
 def get_scheme_names():

I suppose these changes can create other problems sooner or later so they are
not a fully satisfactory solution, just a workaround to this specific problem.
If someone has a better solution please, tell me.



	Share what you know, learn what you don't

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.python.org/pipermail/numpy-discussion/attachments/20110406/ec1ee22c/attachment.sig>

More information about the NumPy-Discussion mailing list