6

I am trying to run certain commands in Git Bash but they continue to hang and not display anything. When I run them in the Windows command prompt they work.

For example, in my windows command prompt the

Microsoft Windows [Version 10.0.10586]
(c) 2015 Microsoft Corporation. All rights reserved.

C:\Users\danie>python.exe
Python 2.7.11 |Anaconda 4.0.0 (64-bit)| (default, Feb 16 2016, 09:58:36) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
Anaconda is brought to you by Continuum Analytics.
Please check out: http://continuum.io/thanks an d https://anaconda.org
>>>

and in Git Bash it just hangs...

danie@DESKTOP-36I511A MINGW64 ~
$ python

I have tried navigating directly in to the folders where the commands exist, trying 'python.exe', and waiting.

I have also looked at the PATH variables for Git Bash, and python.exe is inside of the Anaconda2 folder which I can see below when I run env|grep PATH.

danie@DESKTOP-36I511A MINGW64 ~
$ env|grep PATH
HOMEPATH=\Users\danie
MANPATH=/mingw64/share/man:/usr/local/man:/usr/share/man:/usr/man:/share/man:
PATH=/c/Users/danie/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/danie/bin:/c/Program Files/Dell/DW WLAN Card:/c/Program Files (x86)/Intel/iCLS Client:/c/Program Files/Intel/iCLS Client:/c/Windows/system32:/c/Windows:/c/Windows/System32/Wbem:/c/Windows/System32/WindowsPowerShell/v1.0:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files/Intel/Intel(R) Management Engine Components/DAL:/c/Program Files (x86)/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files/Intel/Intel(R) Management Engine Components/IPT:/c/Program Files/WIDCOMM/Bluetooth Software:/c/Program Files/WIDCOMM/Bluetooth Software/syswow64:/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/c/Program Files (x86)/Skype/Phone:/c/Program Files/Microsoft SQL Server/Client SDK/ODBC/110/Tools/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/Tools/Binn:/c/Program Files/Microsoft SQL Server/120/Tools/Binn:/c/Program Files/Microsoft SQL Server/120/DTS/Binn:/c/Program Files (x86)/Microsoft SQL Server/120/Tools/Binn/ManagementStudio:/c/Program Files (x86)/Microsoft SQL Server/120/DTS/Binn:/c/Users/danie/Anaconda2:/c/Users/danie/Anaconda2/Scripts:/c/Users/danie/Anaconda2/Library/bin:/c/Users/danie/SQLite:/usr/bin/vendor_perl:/usr/bin/core_perl
EXEPATH=C:\Program Files\Git
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC
PKG_CONFIG_PATH=/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig
ACLOCAL_PATH=/mingw64/share/aclocal:/usr/share/aclocal
INFOPATH=/usr/local/info:/usr/share/info:/usr/info:/share/info:

This happens with other commands too. Sometimes adding "interactive" helps, other times it doesn't. Any idea what is going on?

3
  • Have you had a look at this similar question? stackoverflow.com/questions/32597209/… Looks like it might be to do with a bug in ncurses support. Scroll to the answer with 18 upvotes and see if it helps... Commented May 13, 2016 at 7:07
  • I saw that article yesterday, but just tried adding "winpty" before my commands for the first time and it worked! I can now run my commands in Git Bash. It's pretty annoying to type "winpty" before all commands though, any idea how to get around that? I will ask in the other thread as well. Thank for your help! Commented May 13, 2016 at 15:53
  • Update: I ended up just aliasing the problematic windows commands (python, sqlite3, and some others) to get around typing winpty. Hopefully this is an OK solution. Commented May 13, 2016 at 17:07

1 Answer 1

1

Update: I ended up just aliasing the problematic windows commands (python, sqlite3, and some others) to get around typing winpty. Hopefully this is an OK solution.

To do this, I created a .bash_profile file in the home directly for Git Bash, and did something like this for each command: alias sqlite3='winpty sqlite3.exe'

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.