On 2011-04-05 Vicent Mas <[email protected]> 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.
> 

FYI,

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@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 @@
         else:
             inc_dir = _PROJECT_BASE
     else:
-        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.

Vicent

::

        Share what you know, learn what you don't

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
NumPy-Discussion mailing list
[email protected]
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to