I installed anaconda for python 3.7 in my windows 10 pc.
When I put python
in gitBash
, it says
bash: python: command not found
How can I use python globally? So I can use python command everywhere.
I installed anaconda for python 3.7 in my windows 10 pc.
When I put python
in gitBash
, it says
bash: python: command not found
How can I use python globally? So I can use python command everywhere.
you should execute "Anaconda Prompt" and then you can start "python" from there.
it is not recommended to "add to path" during Anaconda installation on Windows 10. So, it's normal python from Anaconda is not in your path.
Add python to your path like this:
$ PATH=$PATH:/path/to/python
and do not specify the .exe then you can use it from git bash
@Nahid, you can check my answer at Conda not recognized as internal or external after creating new environment.
Close already opened terminals.
Follow the instructions given in that link.
Open new terminal (Git BASH).
Type winpty python
or python -i
(Simply typing python
on terminal will not work).
Enjoy and ask/comment here if you face any issue.
It depends where you installed Anaconda. Unless you have install Linux version of Anaconda(preferable Miniconda), you need to point gitBash to your Windows Python. E.g. in gitBash
alias python='winpty python.exe'
If you want a specific Python the 'winpty fullpath/python.exe' to make it permanent, add that command to your .bashrc
cd ~
touch .bashrc
Then add the command above. Save and restart your terminal.
Similar issue: Python not working in the command line of git bash