I have numpy 1.8.2 installed in /usr/lib/python3/dist-packages (via apt), and the newest version (1.9.2) installed in /usr/local/lib/python3.4/dist-packages (via pip). Both paths are in sys.path (in that order), but only the older apt version is getting imported in python3.
➜ ~ sudo pip3 install --upgrade numpy [sudo] password for naught101: Real name of requirement numpy is numpy Requirement already up-to-date: numpy in /usr/local/lib/python3.4/dist-packages Cleaning up... ➜ ~ ipython3 Python 3.4.0 (default, Apr 11 2014, 13:05:11) Type "copyright", "credits" or "license" for more information. IPython 1.2.1 -- An enhanced Interactive Python. ? -> Introduction and overview of IPython's features. %quickref -> Quick reference. help -> Python's own help system. object? -> Details about 'object', use 'object??' for extra details. In : import numpy In : numpy.version Out: <module 'numpy.version' from '/usr/lib/python3/dist-packages/numpy/version.py'> In : KeyboardInterrupt In : numpy.version.version Out: '1.8.2' In : import sys In : sys.path Out: ['', '/usr/local/bin', '/usr/lib/python3/dist-packages', '/usr/lib/python3.4', '/usr/lib/python3.4/plat-x86_64-linux-gnu', '/usr/lib/python3.4/lib-dynload', '/usr/local/lib/python3.4/dist-packages', '/usr/lib/python3.4/dist-packages', '/usr/lib/python3/dist-packages/IPython/extensions']
(python3 does the same thing as ipython3 here)
How can I get python3 to use the newer version?
I can't just uninstall the apt version, because other packages depend on it.