[Numpy-discussion] installation under other than .../site-packages

Humufr humufr at yahoo.fr
Thu Jan 26 20:05:09 CST 2006


This solution is the one I'm using. Unfortunatly it's not working good 
with scipy. I tried to install scipy in my own directory and everythong 
seems to work like a charm but the lapack link is bad. I tried 
everything write in the wiki to install your own BLAS/LAPACK library but 
scipy want tu use the one of the system who have a problem. I'm trying 
to find a solution but until I found it numpy/scipy is not an option.

N.

David M. Cooke wrote:
> On Jan 25, 2006, at 07:52 , Jose Borreguero wrote:
>
>> My system administrator has told me numpy has to be installed  under 
>> /local , instead of under /usr/lib/pythonx.x/site-packages.  Can 
>> anybody point to me what modifications do I have to make for  this. ? 
>> Also, will other libraries that call numpy work after I  install ?
>> jose
>
> First, to install it under /usr/local, run setup.py like this:
>
> $ python setup.py --prefix=/usr/local
>
> This will put numpy into /usr/local/lib/pythonx.x/site-packages.
>
> Next, check if you can import it. If you can't, it's likely that that  
> path is not in your sys.path. Probably the easiest way to make it  
> available for _all_ users is to ask your sysadmin to put a file  
> called 'usrlocal.pth' in /usr/lib/pythonx.x/site-packages with these  
> contents
>
> import site; site.addsitedir('/usr/local/lib/pythonx.x')
>
> (hopefully he'd be amiable to adding only one file :) This adds /usr/ 
> local/lib/pythonx.x to the sys.path *and* processes any .pth in it.  
> You can get fancier and add
>
> import os, site; site.addsitedir(os.path.expanduser('~/lib/pythonx.x'))
>
> which would also look in user directories.
>
> Failing that, you'd set the environment variable PYTHONPATH to  
> include the right directory. This way, .pth files won't be processed.  
> You could add a sitecustomize.py with the appropriate 'import site;  
> site.addsitedir(...)'. The addsitedir is what processes .pth files.
>
> These are all generic instructions, not specific to numpy. numpy  
> itself doesn't need .pth files, but there are other packages that do  
> (Numeric, PIL, pygtk, amongst others), so it's handy to have.
>




More information about the Numpy-discussion mailing list