

Git Bash uses linux file structure so you need to change the "\" for "/"Īnd if you have a path like my example Network Automation you put it with " " So you must create 2 aliases, one for Python 2 ( I named python2) and the other for Python 3 ( I named just python) In my case the python.exe are installed in: C:\Networking\Network Automation\Python 2.7\python.exeĬ:\Networking\Network Automation\Python 3.7\python.exe It is located in:Ĭ:\path where you installed Git\etc\profile.d\aliases.sh 1) Open (with a text editor like Atom or other) the aliases.shįor ex: in my case the file is in C:\Software\Develop\Git\etc\profile.d\aliases.sh 2) Add your alias for Python This is (for me) the best solution to run both Python (Python 2.7 and Python 3.x) directly from Git Bash on Win 10 => adding aliases into the aliases file that Git Bash uses for. Git Bash Workaround- Launch Python 2 & Python 3 with aliases See more here: Git for Windows doesn't execute my. Conda also uses this profile when initializing, so be sure not to overwrite or delete the initialization block. To apply the change, either use the command source. bashrc in your prefered text editor and add it there. Depending on your file manager, this may be easier to accomplish in git bash like so: cd ~Īt which point you can open.

Using a text editorĪlternatively, you could first create a. bashrc in the current users home directory if the file doesn't exist or append the alias to the end of. This can be accomplished from git bash like so: echo "alias python='winpty python.exe'" > ~/.bashrc You can use the CLI or a text editor: Using CLI Permanent solutionĪdd the command to your.
#ATOM GIT BASH WINDOWS 10 SOFTWARE#
Winpty is a Windows software package providing an interface similar to a Unix pty-master for communicating with Windows console programs.

This alias will be valid for the duration of the shell session. Just enter this in your git shell on windows - > alias python='winpty python.exe', that is all and you are going to have alias to the python executable.
