Reputation: 163
I am having problems installing scipy on a linux system. This question has been asked before, but I couldn't exactly figure out the solution, especially what is the latest solution because it seems that lot of these repositories get updated constantly, probably so are the solutions. I thought of posting this in the previous post with this issue, but noted that I should only provide an answer to teh issue, not post my problem there! So here I am creating a new post. I know this post will be voted down, blocked, chided.... but please be kind in also pointing to what exactly could be the issue I have. I have scoured through the web, particularly stackoverflow for ways to install scipy in the linux system I am using, and to the best of my knowledge and abilities (limited, I am not a software pro) have used various suggestions posted here. So here is what I have: 1) I am on linux system:
Linux compute-0-25.local 2.6.18-164.el5 #1 SMP Tue Aug 18 15:51:48 EDT 2009 x86_64 x86_64 x86_64 GNU/Linux
2) Installed virtualenv, created and activated a virtual environment:
curl -O -k https://pypi.python.org/packages/source/v/virtualenv/virtualenv-1.9.1.tar.gz
tar xvfz virtualenv-1.9.1.tar.gz
cd virtualenv-1.9.1
/usr/local/python/2.6.5/bin/python virtualenv.py myVE
. virtualenv-1.9.1/myVE/bin/activate
3) Installed numpy:
pip install numpy
4) Tried installing scipy:
pip install scipy
Got the following error in the pip.log file: https://gist.github.com/hariiyer16/5910959
Also tried (based on a previous post here):
pip install git+http://github.com/scipy/scipy/
This did not work however. Also tried easy_install which did not work. Will post these errors too if it helps.
From going through some of the previous posts, I might have to get the scipy dependencies (libamd2.2.0 libblas3gf libc6 libgcc1 libgfortran3 liblapack3gf libumfpack5.4.0 libstdc++6 build-essential gfortran libatlas-sse2-dev python-all-dev). Can someone tell me if that's the case? In that case, I have to check with our admin since I do not have superuser privileges (can only install stuff in my directory). But before asking teh admin, I want to be sure of what dependencies needs to be installed. It would be great to get some pointers along with some vote-downs. Would really appreciate that. Previously, I was able to install numpy, scipy etc on my Mac (snow leopard) with help from folks here, and grateful for that. But this one has been pretty daunting and have spent far too much time on it.
Thanks.
Upvotes: 1
Views: 6306
Reputation: 163
After a lot of trying, I did a clean install of Python in a new virtual environment. And since I was doing a clean install I went with Python 2.7.5.
Then activated the virtual environment.
Then used pip install
to install numpy
and scipy
, which did not work! (Have no idea why. It would be great to know if someone has a clue).
However, tried easy_install
and both numpy and scipy worked. Happy that it worked, but am not going to sleep peacefully because have no clue what was the actual problem.
Following are the complete codes:
wget http://www.python.org/ftp/python/2.7.5/Python-2.7.5.tgz
tar -zxvf Python-2.7.5.tgz
mkdir ~/Python-2.7
cd Python-2.7.5
make clean
./configure --help #get to know the options in configure
./configure --help | grep -i ucs $get to know the UCS options
./configure --prefix=/home/org/username/Python-2.7 #install Python in the Python-2.7 directory
make
make install
cd virtualenv-1.9.1/
~/Python-2.7/bin/python setup.py install #this installs virtualenv in the new Python directory
cd ..
mkdir ~/virtualenv-1.9.1/myVE_Python2.7
cd ~/virtualenv-1.9.1/myVE_Python2.7
~/Python-2.7/bin/virtualenv py2.7 --python=/home/org/username/Python-2.7/bin/python2.7
ls -l virtualenv-1.9.1/myVE_Python2.7/py2.7/bin/
. virtualenv-1.9.1/myVE_Python2.7/py2.7/bin/activate
ls -l virtualenv-1.9.1/myVE_Python2.7/py2.7/bin/
easy_install -U setuptools
easy_install numpy
easy_install scipy
ls -l /home/org/username/virtualenv-1.9.1/myVE_Python2.7/py2.7/lib/python2.7/site-packages
Found the following posts useful: Is it possible to install another version of Python to Virtualenv?
How to find out if Python is compiled with UCS-2 or UCS-4?
http://www.cyberciti.biz/faq/debian-ubuntu-centos-rhel-linux-install-pipclient/
Use different Python version with virtualenv
Thanks.
Upvotes: 5