Upgrading python virtualenv to the latest version on Ubuntu

(0 comments)

Virtualenv is great, you should use it! However Ubuntu comes with an old virtualenv, including it's basic dependencies setuptools and pip. The latest version of virtualenv only includes setuptools and pip when you create a new venv so you want up to date versions of those in your global install.

Here's what I like to do to get a good setup.

First you need a basic version of setuptools:

sudo apt-get install python-setuptools

Now we want to install the latest verion of pip:

Download the .tar.gz from https://pypi.python.org/pypi/pip

tar -zxf pip-X.Y.Z.tar.gz
cd pip-X.Y.Z/
sudo python setup.py install
pip -V

And then we use pip to install up to date versions of virtualenv and setuptools:

sudo pip install --upgrade setuptools virtualenv

You can now maintain this setup by regularly running:

sudo pip install --upgrade pip setuptools virtualenv
Currently unrated

Comments

There are currently no comments

New Comment

required

required (not published)

optional

Recent Tweets

  • Fredrick Rybarczyk

    Fredrick Rybarczyk @Fredrick_R

    Ernst Sjöstrand

    SLUTA skriva som om lärarbehörighet vore en särskilt relevant. Våra elever måste få träffa lärare med ämneskunskape… https://t.co/VYMawBky4O
    1 day, 10 hours ago

  • Myq Kaplan

    Myq Kaplan @myqkaplan

    Ernst Sjöstrand

    TRUMP: Mexicans are bad TRUMP: Muslims are bad TRUMP: Media are bad EVERYONE: what about Nazis TRUMP: let's not single anyone out
    2 days, 5 hours ago

  • Åsa Schwarz

    Åsa Schwarz @AsaSchwarz

    Ernst Sjöstrand

    Regeringen börjar nu använda Sveriges tunga kompetens inom cybersäkerhet rätt. @amelsec tillträder som styrelsemedlem hos Trafikverket. =>
    1 week ago


Recent Posts

Archive

2016
2015

Categories

Tags

Authors

Feeds

RSS / Atom