简体   繁体   中英

python setup.py build with a given python version

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 ?

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

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 (eg because of virtualenv ) make sure to activate the virtualenv first.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM