Search code examples
python-2.7windows-7cygwinpip

How does Python work on Cygwin?


I installed Python 2.7.9 from (https://www.python.org/downloads/windows/), and then Cygwin 2.8.59. But I had problems when installing numpy. pip install numpy error: Unable to find vcvarsall.bat

So I uninstalled python using set-x86.exe (Cygwin installer). Now my commands python and pip are these:

    $ which python
    /cygdrive/c/Python27/python
    $ which pip
    /cygdrive/c/Python27/Scripts/pip

I could installed numpy using pip, and execute files by "python test.py". I, however, cannot use interactive console. If I type

    $python

the console freezes and I cannot do anything other than Ctrl+C. How should I do to use the command, "python"?


Solution

  • Try

    cygstart /cygdrive/c/Python27/python.exe
    

    According to this question: Using Windows Python from Cygwin

    cygwin is just going to hang because windows doesn't think that the cygwin command 'Python' means interactive console, and will not flush the buffer as if it were an interactive console.