Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am trying to install the Pillow module for python 3.3, but for that I need to install pip. Every time that I install pip it installs for python 2.7, any help?

share|improve this question
add comment

2 Answers 2

up vote 9 down vote accepted

While on more modern versions of Ubuntu you could just sudo apt-get install python3-pip (and then use pip3), a Python 3 copy of pip was never packaged for 12.04.

Therefore you need to follow the more old fashioned install route with easy_install:

sudo apt-get install python3-setuptools
sudo easy_install3 pip

Now, there is every chance that this will clash with Python 2's pip and overwrite /usr/bin/pip. Instead of risking that, it's probably best to start investigating the happy world of virtualenv as this answer suggests.

share|improve this answer
    
I have already tried that but this always shows up: Unable to locate package python3-pip –  BCasaleiro Jan 28 at 19:38
    
@BCasaleiro Sorry, I should have checked. Updating the answer. –  Oli Jan 29 at 8:38
    
Thanks, it worked like a charm –  BCasaleiro Jan 29 at 11:06
add comment

After installing python 3.3 using a PPA for Ubuntu 12.04, I installed easy_install 3.3 using locally using the following commands

wget http://python-distribute.org/distribute_setup.py
python3.3 -m distribute_setup install --user
easy_install-3.3 --user pip

This avoids polluting the site's installation of pip and easy_install. Finally, I added $HOME/.local/bin to my path. Now I can run pip3.3!

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.