Are you sure? After an initial apt-get purge, I checked, and indeed /usr/local/lib/python2.7/dist-packages/matplotlib/ remained in place as you imply. I then moved matplotlib* in the above directory out of the way, and sure enough python then fails to import. When I re-install however, it is placed in exactly this directory:
david@spengler:~$ python -c "import matplotlib; print matplotlib"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named matplotlib
david@spengler:~$ sudo apt-get install python-matplotlib
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libdb5.1-java-jni
Use 'apt-get autoremove' to remove it.
Suggested packages:
python-excelerator python-matplotlib-doc python-nose python-tornado
python-traits ttf-staypuft
The following NEW packages will be installed:
python-matplotlib
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/1,421 kB of archives.
After this operation, 7,837 kB of additional disk space will be used.
Selecting previously unselected package python-matplotlib.
(Reading database ... 509799 files and directories currently installed.)
Preparing to unpack .../python-matplotlib_1.3.1-1ubuntu5_amd64.deb ...
Unpacking python-matplotlib (1.3.1-1ubuntu5) ...
Setting up python-matplotlib (1.3.1-1ubuntu5) ...
Processing triggers for python-support (1.0.15) ...
david@spengler:~$ sudo apt-get purge python-matplotlib
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libdb5.1-java-jni
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
python-matplotlib*
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 7,837 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 510097 files and directories currently installed.)
Removing python-matplotlib (1.3.1-1ubuntu5) ...
Processing triggers for python-support (1.0.15) ...
david@spengler:~$ python -c "import matplotlib; print matplotlib"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named matplotlib
Hi Sandro,
Are you sure? After an initial apt-get purge, I checked, and indeed /usr/local/ lib/python2. 7/dist- packages/ matplotlib/ remained in place as you imply. I then moved matplotlib* in the above directory out of the way, and sure enough python then fails to import. When I re-install however, it is placed in exactly this directory:
david@spengler:~$ python -c "import matplotlib; print matplotlib"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named matplotlib
david@spengler:~$ sudo apt-get install python-matplotlib excelerator python- matplotlib- doc python-nose python-tornado matplotlib_ 1.3.1-1ubuntu5_ amd64.deb ...
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libdb5.1-java-jni
Use 'apt-get autoremove' to remove it.
Suggested packages:
python-
python-traits ttf-staypuft
The following NEW packages will be installed:
python-matplotlib
0 upgraded, 1 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B/1,421 kB of archives.
After this operation, 7,837 kB of additional disk space will be used.
Selecting previously unselected package python-matplotlib.
(Reading database ... 509799 files and directories currently installed.)
Preparing to unpack .../python-
Unpacking python-matplotlib (1.3.1-1ubuntu5) ...
Setting up python-matplotlib (1.3.1-1ubuntu5) ...
Processing triggers for python-support (1.0.15) ...
david@spengler:~$ python -c "import matplotlib; print matplotlib" pymodules/ python2. 7/matplotlib/ __init_ _.pyc'>
<module 'matplotlib' from '/usr/lib/
david@spengler:~$ sudo apt-get purge python-matplotlib matplotlib*
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
libdb5.1-java-jni
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
python-
0 upgraded, 0 newly installed, 1 to remove and 1 not upgraded.
After this operation, 7,837 kB disk space will be freed.
Do you want to continue? [Y/n] Y
(Reading database ... 510097 files and directories currently installed.)
Removing python-matplotlib (1.3.1-1ubuntu5) ...
Processing triggers for python-support (1.0.15) ...
david@spengler:~$ python -c "import matplotlib; print matplotlib"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ImportError: No module named matplotlib