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?
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:
Now you can just use easy_install-3.2 to install Pyramid, or go ahead and install pip in Python3.
OPTION 1:
OPTION 2:
Alternatively, if you want to install specific version of the package with the specific version of python, this is the way
If the "=" doesnt work, use "=="
Ouput:
Invalid requirement: 'pyudev=0.16' = is not a valid operator. Did you mean == ?
works fine
Each
python
binary should have its ownpip
executable.You get one automatically if you use
virtualenv
. Then you could just runpip install pyramid
in an activated virtualenv e.g.:If you want to use
pip
to install for a systempython3
then you could installpip
for it:It installs
pip3
program. Then:installs
pyramid
in~/.local
directory tree.If you need to test a Python package on several python versions; you could use
tox
.In the case where you have installed a separate user-only version of Python by downloading and extracting the tar.gz from the Python.org Downloads page and done a:-
You can use get-pip to install and run pip for this Python install only.
Download it with curl as per the git-pip instructions. Then, within your Python-x.x.x/ directory, run:
You can add this to your
.bashrc
file:After creating a new terminal session simply install packages with: