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 have different versions of python installed, python 2.7 being the default and 3.2 the second. Now I want to install pyramid to the 3.2 installation. How can I do this? Just using pip to install pyramid does not work, so how can I change the version it is downloading to?

share|improve this question

2 Answers 2

up vote 6 down vote accepted

You have two options, but either way, you need to get easy_install-3.2. Since it doesn't seem to be packaged, you have to install it yourself. Fortunately that's easy. And you should also get python3-pkg-resources, which is packaged:

sudo apt-get install python3-pkg-resources
wget http://python-distribute.org/distribute_setup.py
sudo python3 distribute_setup.py

Now you can just use easy_install-3.2 to install Pyramid, or go ahead and install pip in Python3.

OPTION 1:

sudo easy_install-3.2 pyramid

OPTION 2:

sudo easy_install-3.2 pip
sudo pip-3.2 install pyramid
share|improve this answer

Each python binary should have its own pip executable.

You get one automatically if you use virtualenv. Then you could just run pip install pyramid in an activated virtualenv e.g.:

$ vex venv pip install pyramid

If you want to use pip to install for a system python3 then you could install pip for it:

$ sudo apt-get install python3-pip

It installs pip3 program. Then:

$ pip3 install --user pyramid

installs pyramid in ~/.local directory tree.

If you need to test a Python package on several python versions; you could use tox.

share|improve this answer

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.