Proplems with python and pip versions

so i keep trying to find my pip and python version’s but all i keep getting is
when i type in
python --version (i also tried —version just incase i was messing up the “-”)
Traceback (most recent call last) :
File “”, line 1, in
NameError: name ‘python’ is not defined
and for pip its the excat same just with a (Did you mean ‘zip’?)
pip --version
Traceback (most recent call last) :
File “”, line 1, in
NameError: name ‘pip’ is not defined. Did you mean ‘zip’?

It sounds like you’re typing that at the Python prompt. That won’t work.

They should be typed at the operating system’s command line.

If you’re using Windows, that would be a Command Prompt window.

Incidentally, if you’re using Windows, it’s recommended to use the Python Launcher py:

py --version

and:

py -m pip --version

1 Like

thank you you fixed the python version but for pip i’m now getting python.exe: no module named pip (i’m using windows) what should i do?

Try running the installer again and select Modify. Is pip selected?

yes pip is selected

Try running py -m ensurepip which is there to ensure that you have some version of pip.

1 Like

thank you that worked

i have a different problem now im trying to install stable diffusion on my computer but it says i need to down grade to python 3.10 how do i down grade it?

‘Downgrade’ is the WRONG word. Just install 3.10 along with whatever you have now. Use the py launcher chose which python to run. Read in particular this about how to set which version is default. If you want to keep your current default, make sure Make this the default python, however worded, uncheck. Or check to make 3.10 the default but investigate how stable diffusion is launched first.

so it doesn’t tell me if i should use python or command prompt to set default version so i tied both but when i tied command prop it comes back as
PY_PYTHON3=3.10
‘PY_PYTHON3’ is not recognized as an internal or external command,
operable program or batch file.
and for python i got

PY_PYTHON3=3.10

i then added [default] just incase and i got this

PY_PYTHON3=3.10
[default]
Traceback (most recent call last):
file “”, line 1, in
NameError: name ‘defaults’ is not defined

am i doing something wrong?

The answer is neither. PY_PYTHON3=3.10 is for setting an environment variable.

Press the Windows key and enter “env”. It should then show a link to “Set the environment variables”.

You might want to check whether there’s a py.ini file instead. It would be in C:\Windows next to py.exe or in %LOCALAPPDATA%.

what do i do after i go to Set the environment variables and i dont know howw to check if i have py.ini or py.exe

Then you try to use the py program like before.

The previous post tells you where to look. You check the same way that you would check in any folder for any other file or program. For example, you can open a window in Explorer, navigate to the right folder, and see if you can find it listed there.

whats the py program? (sorry for late reply been busy)

like after i go to set environment variables do i go to python 64 and type in PY_PYTHON3=3.10 or do i go to command prompt and type in PY_PYTHON3=3.10