Quantcast
Channel: Git Bash (Windows) not using PATH - Stack Overflow
Viewing all articles
Browse latest Browse all 2

Answer by Jean-François Fabre for Git Bash (Windows) not using PATH

$
0
0

Unlike python, backslashes not escaping anything are removed in bash.

So

alias python="~\AppData\Local\Programs\Python\Python35\python.exe"

creates an alias to ~AppDataLocalProgramsPythonPython35python.exe

Fix:

alias python="~/AppData/Local/Programs/Python/Python35/python.exe"

or just set the path (.exe suffix is supported on Windows flavours of bash)

export PATH=$PATH:~/AppData/Local/Programs/Python/Python35

(so programs not having access to aliases/shell built-ins can still run python using subprocess or exec)


Viewing all articles
Browse latest Browse all 2

Trending Articles