I've seen a couple solution so far but they don't work. I'm trying to run (in git bash, on windows)
bash scripts/test.sh
But it's supposed to use Python27, and I have that, and Python34. when I type python --version, it tells me it's using Python34. I tried doing
PATH=$PATH:/c/Python27/
But it still tells me I'm using Python34. I know it's in my environment variables, so what am I missing?
$PATH:/c/Python27/
adds /c/Python27/
to the end of your PATH
. The directory containing the Python34 executable must be already in your $PATH
. So you need to add /c/Python27/
before the other directories listed in $PATH
, so it is checked before the directory containing Python34.
PATH=/c/Python27/:$PATH
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.