One may also use the PYTHONPATH environment variable, which gives the interpreter additional locations to search when performing imports.
For example (using Chris' assumptions below): % export PYTHONPATH=$HOME/lib/python/ % stackless_python >> import numpy >> This works in Windows as well. ----- Original Message ----- From: Chris Lee <[email protected]> Date: Friday, January 2, 2009 9:22 am Subject: Re: [Stackless] finding numpy > Using a normal install (not altinstall), I had no problems using > numpy with stackless. If I had to guess I would say that the problem is > that numpy is installed in the site-packages for the normal install but > that site-packages is not in the path for the alternative install. > Try installing numpy in a local directory and append that to the python > path followed by an import e.g.: > > homePath = os.path.expandvars('$HOME') > sys.path.append(homePath+'/lib/python/') > import numpy > On Jan 1, 2009, at 2:04 PM, Alan Bromborsky wrote: > > > I did an alternative install of stackless 'make altinstall' and > > tried to use it with 'numpy' and got the error cannot import > > numpy. _______________________________________________ Stackless mailing list [email protected] http://www.stackless.com/mailman/listinfo/stackless
