A
A
Alexander Krasnov2015-07-09 16:36:53
Python
Alexander Krasnov, 2015-07-09 16:36:53

How to make ubuntu 14.04 default to python 2.7.10?

Hello!
Recently moved from win7 to ubuntu 14.04 LTS.
Faced that after sudo apt-get upgrade python 2.7.6 and I need 2.7.10.
https://renoirboulanger.com/blog/2015/04/upgrade-p... - followed the instructions and now I have python 2.7.10 in /usr/local/lib/python2.7.10/bin/python.
And how to make .10 run by default?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
Stanislav Fateev, 2015-07-09
@Pompeius_Magnus

The most correct way is to use virtualenv and virtualenvwrapper. It's very simple - one command creates an environment. In your case:

mkvirtualenv --python=/usr/local/lib/python2.7.10/bin/python
You can run any version with any packages, leaving the system alone. Using the system python for your projects is bad, because if there are a lot of projects, and for each you need different pythons or versions of the same django, why reinstall the system python every time?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question