#๐Ÿ”’ python3 vs python alias

27 messages ยท Page 1 of 1 (latest)

karmic nymph
#

setting up python environment on new vscode installation with python extension installed + newest version of python downloaded and setup, with PATH enabled upon install, but only python is recognized and not python3, is this a new change or did i do something wrong?

next lilyBOT
#

@karmic nymph

Python help channel opened

Remember to:

  • Ask your Python question, not if you can ask or if there's an expert who can help.
  • Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
  • Explain what you expect to happen and what actually happens.

:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.

earnest imp
#

you could probably do that custom, but why?

#

the best way on windows is actually to use py

karmic nymph
#

i thought python3 was a default command maybe im schizophrenic

#

what OS is it for then

earnest imp
#

python3 was/is to avoid name conflict with the system python on Unix oses

karmic nymph
#

ok that's where i remember it from

#

my bad

earnest imp
#

do you often use multiple versions of python btw?

#

or just one installed

karmic nymph
#

just one for now

earnest imp
#

if you ever intend on having multiple installed, I can help you set yourself up for success

languid forge
#

so py project.py uses the lastest version of python you have installed

#

py -3 project.py ensures you use python 3

#

py -3.12 project.py would ensure python 3.12

#

etc.

#

similarly, py -3.13 -m pip install library

#

adding python to PATH is usually not a good idea unless you have a good reason not to use virtual environments

#

(that's why the option is unchecked by default)

karmic nymph
#

i see, thanks all!

earnest imp
#

if you do remove python from the path and use py, then also remove the App Execution Aliases for python and python3

#

otherwise it will prompt you to open the windows store when you run them

next lilyBOT
#
Python help channel closed

This help channel has been closed and it's no longer possible to send messages here. If your question wasn't answered, feel free to create a new post in #1035199133436354600. To maximize your chances of getting a response, check out this guide on asking good questions.