Installing a new Windows system, I've installed CygWin and 64 bit Python (2.7.3) in their default locations (c:\cygwin
and c:\Python27\python
), and added both the CygWin bin and the Python directory to my path (in the user variable PATH). From the normal command window, Python starts up perfectly, but when I invoke it from bash
in the CygWin environment, it hangs, never giving my the input prompt.
I've done this on other machines, previously, but always with older versions of Python (32 bits) and CygWin, and with Python in a decidely non-standard location. Has anyone else had this problem, or could someone tell me what it might be due to?
Installing Python for Cygwin. Packages are installed for Cygwin using its setup utility, setup-x86_64.exe for 64-bit (source: http://cygwin.com/install.html). By default, the Cygwin setup utility asks for elevated Administrative permissions. These are not necessary to install and update the base Cygwin environment.
Python can be run on a variety of platforms such as Windows, Unix and Linux. Cygwin is an open source tool that brings all the functionality from Linux to Windows, like a Linux emulator. If you'd like command line operation for programming run a Linux shell such as Cygwin on Windows to use Python.
Show activity on this post. Try using Ctrl-D to exit instead.
The fast way is to reorder your $PATH so that 2.5 is picked up first. The correct way is to use virtualenv to create a jail environment that's specific to a python version. Show activity on this post. As an addition to Bon's post, if you're not sand-boxing your not doing it right.
Try this
python -i
and yes you will find some glitches here and there !!!
Option -i
forces an interactive prompt as shown in Python help python -h
page here.
$ python -h -i : inspect interactively after running script; forces a prompt even if stdin does not appear to be a terminal; also PYTHONINSPECT=x
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With