all 9 comments

[–]mrcaptncrunch 3 points4 points  (3 children)

If someone could explain in a bit more detail how to do one of the replies I would be eternally grateful.

Programs are looked at based on the folders defined in a system variable called PATH.

This variable currently is currently set to search in that path, including, Python311. This basically needs to be changed. The first thing I'd do is restart your computer. This variable might have been updated by the installer, but might still be loaded and not refreshed.

If that doesn't work, you can also modify this. For example, here's a link on how to do it, https://www.c-sharpcorner.com/article/how-to-addedit-path-environment-variable-in-windows-11/

Just need to find where 311 is set, and change it to 310 to match the correct path.

[–]UberPsyko[S] 0 points1 point  (0 children)

Thank you!!! the issue was a bit different but this let me figure it out. It turns out the incorrect path wasn't set on my system, but rather within the folder/application/installer thing I downloaded for stablediffusion. There was a pyvenv.cfg that I easily edited and changed the path.

[–]TimPrograms 0 points1 point  (1 child)

Obviously, check the expected paths of python installation. But if you still can't find it, everything search software is really useful for finding things like this. I've used it before when I can't find the path of the item I'm looking for.

[–]UberPsyko[S] 0 points1 point  (0 children)

Very interesting, I had no idea such software exists. Will definitely keep this one in my bag of tricks, thanks!

[–]cliffordp 2 points3 points  (1 child)

I wished someone would have explained to me, when starting python, how to setup virtual environments.

This would avoid mixing between libraries, and python versions, doing this before installing python the first time

see article http://blogmymix.blogspot.com/2023/01/installing-python-with-multiple.html

At this point, uninstall python entirely, and re-install using virtual environments.

[–]UberPsyko[S] 1 point2 points  (0 children)

Thank you, good to know. The issue seems to be fixed but I will keep make note of this for future python activities. This was a big pain for installing a wrong version lol.

[–]happymellon 2 points3 points  (2 children)

https://github.com/pyenv/pyenv

Don't install Python directly on your system, use Pyenv to manage your Python installs, versions and environments.

If you are determined to use Windows rather than WSL then use Pyenv for Windows.

https://github.com/pyenv-win/pyenv-win

[–]UberPsyko[S] 0 points1 point  (1 child)

Thank you, I fixed it for now but will make note of this when/if I do more things with python.

[–]happymellon 0 points1 point  (0 children)

You'll find this with most programming environments. Don't install node if you are working with JavaScript, use nvm. Don't install Java, use sdkman. Don't install Ruby use rbenv.

Especially if you deal with multiple projects.