r/learnpython • • 2h ago

Help me set up my environment for this project

I used to dabble around with Python from time to time...

However every time I come back to it I seem to hit this brick wall before I even get to write a line of code.

Long story short, I want to do the tutorial you find here:
https://www.youtube.com/watch?v=8OMghdHP-zs

I just wanna get to work instead of spending hours and hours grappling with things not installing properly, as it is yet again doing to me right now. So either help me fix the errors I am getting or show me the easy alternative.

I'd rather not use VSCode because it's Microsoft and it seems almost impossible to disable the AI "copilot" thing, from what I read online, so I'd rather not if that's the case.

I used to use Anaconda to set up environments using older versions of python and pygame, however, setting up an environment with python 3.14 it throws this at me when I activate it:

C:\Users\Mokpo>if exist "C:\Windows\System32\msmpi.dll" (

echo "You seem to have a system wide installation of MSMPI. "

echo "Due to the way DLL loading works on windows, system wide installation "

echo "will probably overshadow the conda installation. Uninstalling "

echo "the system wide installation and forced deleting C:\Windows\System32\msmpi*.dll"

echo "will help, but may break other software using the system wide installation.")

C:\Users\Mokpo>if defined MSMPI_BIN (set "MSMPI_BIN_CONDA_BACKUP=" )

C:\Users\Mokpo>if defined MSMPI_INC (set "MSMPI_INC_CONDA_BACKUP=" )

C:\Users\Mokpo>if defined MSMPI_LIB64 (set "MSMPI_LIB64_CONDA_BACKUP=" )

C:\Users\Mokpo>if defined MSMPI_LIB32 (set "MSMPI_LIB32_CONDA_BACKUP=" )

C:\Users\Mokpo>set MSMPI_BIN=\Library\bin

C:\Users\Mokpo>set MSMPI_INC=\Library\include

C:\Users\Mokpo>set MSMPI_LIB64=\Library\lib

C:\Users\Mokpo>set MSMPI_LIB32=""

Okay so it's recommending me to delete a file on which other things may depend system-wide, because Anaconda cannot get the environment to isolate itself from it and use the "proper" version instead? Will that not risk me breaking my OS in some horrible way?

Anyway. After typing "spyder" I get an error popup window titled: "analysecrash.exe - Application Error" saying "The application was unable to start correctly (0xc0000142). Click OK to close the application." This happens again once after I click okay.

However, Spyder does in fact launch, except it doesn't do anything. As in, I can make a folder into a project, theres a "temp.py" file open in the editor, I write print('hello world'); and click "run" but it doesnt do anything.

When I was trying this before, it did say something somewhere about the console not working because "the kernel" isnt loaded or whatever?

Anyway, this is extremely, extremely frustrating, especially as so many "beginners tutorials" seem hell-bent on skipping over any of this preliminary setup stuff like it's hot lava, while 99% of the actual beginners presumably die before they get to even try out much code, you know, like it's hot lava they cant skip over yet. I've written some programs in python before so I'm not even a beginner it's just this stuff is so obscure and it always manages to "snipe" me somehow whenever I try something new. So more generally, if there's a way to learn to deal with these kinds of problems, finding out more about how it works, etc... How do I become the person that answers these questions rather than asks them?

1 Upvotes

5 comments sorted by

2

u/Sideways-Sid 2h ago

Full sympathy OP. I get similar frustrating messages each time I try to use Python.

I WANT to use it but there are too many hurdles for one used to using Excel, which just works.

1

u/MokpotheMighty 2h ago

Sadly, one cannot make video games so easily with excel. Or use graphics to appear on one's screen by means of pygame-ce, presumably. But I may be missing something.

Seriously though. I am really wondering if it really has to be this hard. Any other type of software package, if it was published and so many people (I cannot imagine I'm in the minority having these problems) would just run into error after error just trying to install it, it'd be a scandal. I can imagine things just not being that simple for software used to make other software, maybe, but why is no one even talking about this?? like is there any research on this phenomenon? I genuinely want to know what % of people who try one of these "easy, simple beginners tutorials" just stop before lesson 2 because they just cant get anything to work as intended. Wouldn't surprise me if it's over 50%.

1

u/Individual-Age6528 1h ago

The question you should ask yourself is: Do you really need to use Anaconda?

1

u/SnipTheDog 2h ago

Try Spyder or PyCharm. Spyder is a simple gui, but not always runs well. (https://www.spyder-ide.org/)

1

u/SmokeyTheAgent 1h ago

Don't delete anything in System32. That MSMPI block is just an activation script from an MPI package that got pulled into your conda env (Spyder/conda-forge deps do that). It's a warning, not an error, and it has nothing to do with pygame.

For a pygame tutorial you don't need conda at all. The boring setup that almost never breaks on Windows:

  1. Install Python from python.org. I'd pick 3.13 rather than 3.14 for now, since some packages lag a release behind on wheels.
  2. Make a project folder, open a terminal in it, and run:

     py -3.13 -m venv .venv
     .venv\Scripts\activate
     pip install pygame-ce
     python -c "import pygame; print(pygame.version.ver)"
  3. If that last line prints a version, you're done with setup. Write main.py and run it with python main.py from that same activated terminal.

Editor: Thonny or plain IDLE are fine for this. If you want something VS Code-like without Microsoft, VSCodium is the same editor built without their branding and telemetry. Spyder is a data-science tool and its separate kernel is exactly the kind of thing that breaks silently; pygame opens its own window anyway, so you don't gain anything from it.

On the bigger question: most of these problems come down to "which python is actually running, and which folder does it install packages into". Two commands answer that every time:

where python
python -c "import sys; print(sys.executable)"

If the path isn't inside your .venv folder, that's your bug. Once you get used to checking that first, you become the person who answers these threads.