I have a virtual machine set up running Ubuntu 14.04.4 which has Python 2.7.6 by default. I've since installed Python 2.7.11 using the instructions here, which has left me with a python installation in /usr/local/bin/ that contains a python2.7 executable.
I've looked around for answers on this but most solutions seem to rely on the minor version being different for the two installs, 2.6 vs 2.7 for example. In this particular case both installs are 2.7.x which is making it difficult to differentiate between the two. This could hint at the need to simply update the default installation rather than installing a separate version entirely, however the articles I've read on the subject suggest otherwise.
If I run the following commands:
And if I run:
All fine so far. However, if I now decide to install pip and then install python modules, pip and those modules will only be installed for the pre-existing version of python, not the version I installed locally.
With all that in mind, my question is how do I go about installing pip and any modules I need for my local version of python, and how do I tell Ubuntu I want to use my own python for development?
Also, I've seen some articles making heavy use of virtualenv for this, but as I'm aiming to have one virtual machine per project I'm hoping to avoid virtualenv for now, partly to simplify the process of working in the VM and partly for my own learning.