r/learnpython • • 1d 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?

0 Upvotes

12 comments sorted by

1

u/SnipTheDog 1d ago

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

1

u/MokpotheMighty 9h ago

Okay but... I am using Spyder, as I said...

Are you suggesting I use it without Anaconda?

Like I tried something like that earlier today I'm sure, setting up my system as environment in powershell... Let me try that again...

Okay I am not even sure how I am supposed to use Spyder without anaconda at this point. However I set up everything in my "base" environment which is just my plain old OS I suppose, and did it that way. Somehow, this did work. I have no idea why the one does work and the other doesn't. As usual.

I mean then when I opened Spyder it at least told me what about the kernel was missing apparently, so I used pip to install that which it did and now everything seems to be working... For now...

I really wish there was some kind of way I could learn more about these "meta problems" one faces when one's learning to code, because they tend to really stop me dead in my tracks, whereas the others are just bugs I can solve within the clearly defined logic of the language. If you have any idea where I can learn about this, please tell me.

1

u/SnipTheDog 7h ago

I've never seen the need for Anaconda. Spyder works, but it uses a shell which is normally different than where your python is loaded. I just run everything off the command line.

1

u/Sideways-Sid 1d 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/ActuatorGlittering94 15h ago

spreadsheets just work right up until they silently turn a string of numbers into a date in the background

0

u/MokpotheMighty 1d 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 1d ago

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

2

u/MokpotheMighty 9h ago

lol please. Let's not pretend this has anything to do with Anaconda. I've run into this kind of problem trying to set up to code with c++, then to get OGL and c++ to work together, I've really run into this kind of problem throughout the years. This clearly is a much larger issue of hurdles that will just effectively keep newcomers out by clobbering them over the head with obscure technical problems without any kind of warning or explanation as to why this keeps happening. And it's made worse by "easy and accessible" tutorials that brush over the installation and setup process by just literally making them do the specific steps without any explanation or warning that this will in fact go wrong in many cases. It's effectively gaslighting people who are eager to learn into believing they're too stupid to keep up.

2

u/Individual-Age6528 3h ago edited 2h ago

Newcomers don't install anaconda as the first thing they do. They install python, then an IDE and then they start programming. The only thing remotly complicated is setting the "Add python to path" checkbox when installing it. This whole thing seems to be a "you" problem. There is even a post in this thread by smokeytheagent that told you exactly what to do, but no, you know better. So have fun with your conda stuff.

2

u/SmokeyTheAgent 1d 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.

1

u/Correct_Rain_9438 16h ago

On the VS Code worry, the VS Code docs say the chat.disableAIFeatures setting turns off and hides chat and inline suggestions and disables the Copilot extension. You can set it for a workspace or for your user, so VS Code can be used without the AI stuff if that was the only thing putting you off.

1

u/LayotFctor 12h ago

Can you confirm if the dependencies in the tutorial are all from pip? If so, anaconda is unnecessary and you can use standard python venv or uv.

The main purpose of anaconda is helping you to get dependencies that aren't python, which makes python-only tools inadequate. But I highly doubt tutorials actually need such special tools, the tutorial author's probably already using anaconda for other courses and brought it over for no reason.