[SciPy-User] problem running SciPy

Pauli Virtanen pav@iki...
Fri Mar 16 15:52:47 CDT 2012


Hi,

16.03.2012 21:34, Glen Jenness kirjoitti:
[clip]
> [gjenness@pople tmp]$ python -c "import scipy; scipy.test()"
> Traceback (most recent call last):
>   File "<string>", line 1, in ?
>   File "/home/gjenness/programs/scipy-0.10.1/scipy/__init__.py", line
> 128, in ?
>     raise ImportError(msg)
> ImportError: Error importing scipy: you cannot import scipy while
>         being in scipy source directory; please exit the scipy source
>         tree first, and relaunch your python intepreter.
[clip]
> python setup.py config --compiler=intelem --fcompiler=intelem build_clib
> --compiler=intelem --fcompiler=intelem build_ext --compiler=intelem
> --fcompiler=intelem install --prefix=/home/gjenness/programs/scipy-0.10.1/
> 
> If anyone can help me resolve this problem it'd be greatly appreciated.

You probably have done the following:

	cd ~/programs/
	tar xzf scipy-0.10.1.tar.gz
	cd scipy-0.10.1
	python setup.py ..... --prefix=~/programs/scipy-0.10.1/

The correct way would be either

	cd ~/tmp
	tar xzf scipy-0.10.1.tar.gz
	cd scipy-0.10.1
	python setup.py ..... --user

This installs everything under ~/.local. Or,

	python setup.py ..... --prefix=~/programs/scipy-0.10.1/

but now you need to set your PYTHONPATH to point to

	~/programs/scipy-0.10.1/lib/python2.X/site-packages

and not to

	~/programs/scipy-0.10.1

-- 
Pauli Virtanen



More information about the SciPy-User mailing list