1

I had a Ubuntu 12.04 system which I eventually managed to get Python 2.7 and Python 3.2 working together (with pip and pip3) and Python 3.3 (with pip3.3) for good measure.

I've recently upgraded to Ubuntu 14.04 and have decided to take advantage of the python3-pip package. I've also upgrade my python3 package to install Python 3.4.

All I really want is to be able to use python (python2) and python3 as well as do package management using pip and pip3. Which of the following files and directories can I delete to make this installation less messy and confusing?

/usr/bin/easy_install-2.7
/usr/bin/easy_install3
/usr/bin/easy_install-3.4
/usr/bin/pip3
/usr/bin/python
/usr/bin/python
/usr/bin/python2
/usr/bin/python2.7
/usr/bin/python2.7-config
/usr/bin/python2-config
/usr/bin/python3
/usr/bin/python3.3
/usr/bin/python3.3m
/usr/bin/python3.4
/usr/bin/python3.4-config
/usr/bin/python3.4m
/usr/bin/python3.4m-config
/usr/bin/python3-config
/usr/bin/python3m
/usr/bin/python3m-config
/usr/bin/python-config

/usr/lib/python2.7
/usr/lib/python3
/usr/lib/python3.3
/usr/lib/python3.4  

/usr/local/bin/easy_install
/usr/local/bin/easy_install-2.7
/usr/local/bin/easy_install-3.2
/usr/local/bin/easy_install-3.3
/usr/local/bin/pip
/usr/local/bin/pip2
/usr/local/bin/pip2.7

/usr/local/lib/python2.7
/usr/local/lib/python3.2
/usr/local/lib/python3.3
/usr/local/lib/python3.4

Also, both pip and pip3 are currently version 1.5.4, how can I update them both to version 1.5.6 without screwing anything up?

1 Answer 1

2

I would personally leave Ubuntu's Python alone.
Use virtualenv (with --no-site-packages) for development.

It all feels pretty weird and a little stressful when you begin but seriously, not bumping into system conflicts and or having your entire Python stack break when you do a release upgrade... It's a million times nicer.

Some people go for one virtualenv per project. I like to keep mine together because it forces me to maintain old code. I can't let Django 1.1 projects exist because they aren't compatible with my Django 1.5 environment.

The obvious exception to any of this is developing for Ubuntu ... but then you really need to rely on Ubuntu-shipped packages (or include libraries in your package).

3
  • Not so simple if you want to use packages like PyQt.
    – Valentas
    Apr 4, 2016 at 9:40
  • @Valentas Sure. Not impossible but there are several ways you can cheat stackoverflow.com/questions/1961997/… and you still get a nice local environment.
    – Oli
    Apr 4, 2016 at 10:27
  • @Valentas You can just symlink the PyQt libraries into the virtualenv.
    – edwinksl
    May 27, 2016 at 4:07

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .