Question

All,

I have several versions of Python installed. In the environment variables, i have two paths to site-packages folders.

In the cmd, I would like to do

python setup.py build 

with one given version of Python, say the version at D:\Python333\lib\site-packages. But it keeps calling the wrong Python version, at, say, C:\Python27\lib\site-packages.

How can i have setup launched by the version of Python i wish ?

Était-ce utile?

La solution

You call setup.py with the Python version you want to install, e.g.

sudo python2.5 setup.py install
sudo python2.7 setup.py install
sudo python3.3 setup.py install

If your Python installation is somewhere else (e.g. because of virtualenv) make sure to activate the virtualenv first.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top