Picarus
Picarus

Reputation: 780

Python installation on cygwin

I am using Windows 8 where I have Python 2.7 installed. In addition I have cygwin installed where I installed also Python 2.7.

I need to install a Python library whose installation on Windows is not supported but it is on Linux so I want to try to use it on Cygwin.

The library has a "configure" script who checks dependencies for many packages and settings and complaints because some python packages are not installed.

But when I try to install them, the system says they are installed. From this, I have concluded that my python windows installation is overlapping my python cygwin installation.

I think that the cygwin is importing in the Path all the windows Path and while the script checking the configuration can find the cygwin installation, when executing from the command-line it is not the case.

Of course, I don't want to remove from the PATH my windows python.

My question is then, what option do I have to work from cygwin only with the cygwin python installed? As far as I have seen in other questions, usually the problem is the opposite (making cygwin to use windows python, what is problematic and not recommended in some cases).

Upvotes: 1

Views: 1797

Answers (1)

rurban
rurban

Reputation: 4131

Set the path in your .profile then.

So if e.g. your Python is in C:\Python27 remove the windows paths to /cygdrive/c/Python27 in .profile

E.g.:

$ echo $PATH
 /usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:
/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:
/usr/bin:/cygdrive/c/Program Files/Microsoft SQL Server/110/Tools/Binn:/bin:/cygdrive/c/Python27:
/cygdrive/c/Python27/Scripts

=>

.profile:
export PATH=/usr/local/bin:/usr/bin:/cygdrive/c/Windows/system32:/cygdrive/c/Windows:
/cygdrive/c/Windows/System32/Wbem:/cygdrive/c/Windows/System32/WindowsPowerShell/v1.0:
/cygdrive/c/Program Files/Microsoft SQL Server/110/Tools/Binn

Upvotes: 1

Related Questions