views:

97

answers:

2

I have a Windows machine with Python 2.3, 2.6 and 3.0 installed and 2.5 installed with Cygwin. I've downloaded the pexpect package but when I run "python setup.py install" it installs to the 2.6 installation.

How could I have it install to the Cygwin Python installation, or any other installation?

+4  A: 

call the specific python version that you want to install for. For example:

$ python2.3 setup.py install

should install the package for python 2.3

vezult
A: 

using "python2.3" can be wrong if another (default) installation patched PATH to itself only.

Task can be solved by:

  1. finding full path to desired python interpreter, on ActivePython it is C:\Python26 for default installation of Python 2.6
  2. make a full path to binary (in this case C:\Python26\python.exe)
  3. execute module install command from unpacked module directory using full path to interpreter: C:\Python26\python.exe setup.py install
Denis Barmenkov