When I type python
into my bash shell (Windows Subsystem for Linux) in Windows 10 Home, I get the following error message:
The program 'python' can be found in the following packages:
* python-minimal
* python3
Try: sudo apt install <selected package>
I've tried installing python3
but am told it's already installed and up to date.
I've tried uninstalling python-minimal
but am told it's not installed (!)
Why am I seeing two "competing" packages for Python? How can I fix the conflict and configure my WSL bash to run Python 3 from python
?
python3
, otherwise, dotype -a python
and it will give you an idea of what you have change. – Brillpython
.type -a python
gives me:-bash: type: python: not found
– Gerdaalias python="python3"
. If you're managing many versions of python, you might want to look into pyenv – Dotipython
in linux world as a CLI command almost always meanspython2
and notpython3
. Make sure that you havepython2
installed (sudo apt install python
). DO NOT alias python to python3 - this is some bad advice! To run python3, you have to specifypython3
on the CLI. – Maviliapython
(v2.7) did the trick and I now understand that for v3.6 I need to stick withpython3
– Gerdapython
->python3
alias and then ran some script that hadpython <do_someting>
in it, the shell would try to invokepython3
when the writer of that script was explicitly intending to run<do_something>
onpython2
so it would likely break. That plus the fact that most Linux bin commands are actually python scripts, this would cause all kinds of funky problems. – Maviliapython
should run Python 3.x. If you have a script that relies on Python 2, use the full path to your binary.$PATH
is to help humans, not scripts. – Disease