/usr/bin/python
points to/usr/bin/python2.7
, the old version 2.7.6 python used by my OS 14.04.For the old python, I wanted to install module
regex
:$ sudo python -m pip install regex /usr/bin/python: No module named pip
So in synatpic, I installed
python-pip
for the old python. The above command now said:Python2/_regex.c:46:20: fatal error: Python.h: No such file or directory
So In synaptic, I installed
libpython2.7-dev
. Now all works.I also installed a newer version 2.7.9 of Python to
/usr/bin/local/python2.7
, by compiling its source.How can I install pip and then install
regex
for my new python?
THanks.