I installed ActivePython which is a Python version 3.x installation for Windows. I renamed the interpreter to be activepython.exe so as to allow calling it from cygwin without modifying /etc/profile path.

When I am in cmd.exe shell I can call ActivePython interpreter without arguments and enter interactive mode. When I execute the ActivePython interpreter from Cygwin shell, the shell just hangs indefinitely after hitting enter (similar to accounts seen by others here).

How do you call ActivePython from cygwin shell?


Found a blog post with the solution here's a summary of the solution:

activepython -i


  • In my case I have ActivePython interpreter on the path as activepython to allow me to call activepython instead of the cygwin installed python.
  • Tip: When you need to exit the interpreter Ctrl-D doesn't work. You need to do Ctrl-C and then the Cygwin shell freezes for 20 seconds before it becomes available again.
  • I found a second more authoritative source on this exact subject. This source is the Cygwin terminal mintty. Here the Cygwin developers are talking about the problem and they seem to talk about the low level issues with windows/mintty/python interpreter.
    • "This explicitly tells it to run in interactive mode. The reason it doesn't work otherwise is that it checks whether stdin is a console. With mintty and other pty-based terminals the answer is no, because Cygwin uses pipes to emulate ptys, so Python enters non-interactive mode."
    • "Unfortunately, not all Windows programs have a workaround like -i to force them to act interactively."
  • I believe that the -i open's the interpreter in 'interactive' mode. Though I'm not for sure on this. Aug 13 '13 at 14:42
  • The -i is for interactive mode. But if you don't specify anything to the interpreter it usually enters interactive mode also. Which is I guess the reason for my question. Aug 13 '13 at 14:47

Making the cygwin shell run from within cmd.exe worked very well for me:

I sued the following shortcut (check the cygwin path matches)

%windir%\system32\cmd.exe /C C:\cygwin64\Cygwin.bat

Cygwin from within cmd.exe runs python without any odd problems

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.