...using Linux (xubuntu).
How to install python2.7.3 + numpy + scipy + matplotlib + scikits.statsmodels + pandas0.7.3 correctly ? My final aim is to have them working. The problem:
~$ python --version
Python 2.7.3
so i already have a system-default 2.7.3, which is good!
~$ dpkg -s python-numpy
Package: python-numpy
Status: install ok installed
and i already have numpy installed! great! But...
~$ python
Python 2.7.3 (default, Oct 23 2012, 01:07:38)
[GCC 4.6.1] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as nmp
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named numpy
this module couldn't be find by python. The same with scipy, matplotlib. Why?
~$ sudo apt-get install python-numpy
[...]
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-numpy is already the newest version.
[...]
why it does not see numpy and others ?
update:
>>> import sys
>>> print sys.path
['', '/usr/local/lib/python27.zip', '/usr/local/lib/python2.7', '/usr/local/lib/python2.7/plat-linux2', '/usr/local/lib/python2.7/lib-tk', '/usr/local/lib/python2.7/lib-old', '/usr/local/lib/python2.7/lib-dynload', '/usr/local/lib/python2.7/site-packages']
>>>
so i do have /usr/local/lib/python2.7
~$ pip freeze
Warning: cannot find svn location for distribute==0.6.16dev-r0
BzrTools==2.4.0
CDApplet==1.0
[...]
matplotlib==1.0.1
mutagen==1.19
numpy==1.5.1
[...]
pandas==0.7.3
papyon==0.5.5
[...]
pytz==2012g
pyxdg==0.19
reportlab==2.5
scikits.statsmodels==0.3.1
scipy==0.11.0
[...]
zope.interface==3.6.1
as you can see, those modules are already installed! But! ls -la /usr/local/lib/ gives ONLY python2.7 dir. And still
~$ python -V
Python 2.7.3
and
import sys
sys.version
'2.7.3 (default, Oct 23 2012, 01:07:38) \n[GCC 4.6.1]'
updated:
Probably I've missed another instance... One at /usr/Python-2.7.3/ and second (seems to be installed "by hands" far far ago) at /usr/python2.7.3/Python-2.7.3/
But how two identical versions can work at the same time??? Probably, one of them is "disabled" (not used by any program, but I don't know how to check if any program uses it).
~$ ls -la /usr/bin/python*
lrwxrwxrwx 1 root root 9 2011-11-01 11:11 /usr/bin/python -> python2.7
-rwxr-xr-x 1 root root 2476800 2012-09-28 19:48 /usr/bin/python2.6
-rwxr-xr-x 1 root root 1452 2012-09-28 19:45 /usr/bin/python2.6-config
-rwxr-xr-x 1 root root 2586060 2012-07-21 01:42 /usr/bin/python2.7
-rwxr-xr-x 1 root root 1652 2012-07-21 01:40 /usr/bin/python2.7-config
lrwxrwxrwx 1 root root 9 2011-10-05 23:53 /usr/bin/python3 -> python3.2
lrwxrwxrwx 1 root root 11 2011-09-06 02:04 /usr/bin/python3.2 -> python3.2mu
-rwxr-xr-x 1 root root 2852896 2011-09-06 02:04 /usr/bin/python3.2mu
lrwxrwxrwx 1 root root 16 2011-10-08 19:50 /usr/bin/python-config -> python2.7-config
there is a symlink python-python2.7, maybe I can ln -f -s this link to exact /usr/Python-2.7.3/python destination without harm ?? And how correctly to remove the 'copy' of 2.7.3?