#π Having trouble with installing pygame and OpenGL acceralerate
34 messages Β· Page 1 of 1 (latest)
@pastel grotto
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.
Are you getting errors?
it didn't post one sec
If your code is too long to fit in a codeblock in Discord, you can paste your code here:
https://paste.pythondiscord.com/
After pasting your code, save it by clicking the Paste! button in the bottom left, or by pressing CTRL + S. After doing that, you will be navigated to the new paste's page. Copy the URL and post it here so others can see it.
Which python version do you have?
Python 3.9.19 (a2113ea87262, Apr 21 2024, 08:21:29)
[PyPy 7.3.16 with MSC v.1929 64 bit (AMD64)]
Huh, it should work then. I wasn't sure pygame supported 3.12 but for 3.9 it sure does
i just got a new pc and before this never had an issue
could not actiavating window be a problem?
Do you have python installed from Microsoft store?
I don't think so
not the microsoft store. But i downloaded it from the offical python website
Yeah, that's the one you want (from the official site)
i thought it was a problem with Cython
And the error from gl accelerate is the same?
no
Tbh it might be idk.
Oh, what version is your pip tho?
Try upgrading to to the latest one if possible
already did that
βΓΉ Building wheel for PyOpenGL_accelerate (pyproject.toml) did not run successfully.
ΞΓΆΓ© exit code: 1
ΞΓ²βΞΓΆΓ> [14 lines of output]
running bdist_wheel
running build
running build_py
creating build
creating build\lib.win-amd64-pypy39
creating build\lib.win-amd64-pypy39\OpenGL_accelerate
copying OpenGL_accelerate\__init__.py -> build\lib.win-amd64-pypy39\OpenGL_accelerate
running build_ext
Compiling src\wrapper.pyx because it changed.
[1/1] Cythonizing src\wrapper.pyx
building 'OpenGL_accelerate.wrapper' extension
C:\Users\Kristopher\AppData\Local\Temp\pip-build-env-fgcovadc\overlay\Lib\site-packages\Cython\Compiler\Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: C:\Users\Kristopher\AppData\Local\Temp\pip-install-d5w3vpn0\pyopengl-accelerate_f698a42116d74371b467d88ce945eebe\OpenGL_accelerate\wrapper.pxd
tree = Parsing.p_module(s, pxd, full_module_name)
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
ERROR: Failed building wheel for PyOpenGL_accelerate
Failed to build PyOpenGL_accelerate
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (PyOpenGL_accelerate)
i do have the c++ build tool but there not in my eviromental varables
Oh ok that shouldn't be too much of an issue then. The problem is pygame here. I honestly don't know why it'd do that.
If no one else answers here try putting the link in #python-discussion , and explaining the situation (python from site, 3.9.19, new pc)
Just as a last resource, the command you're running is pip install pygame right? Try py -m pip install pygame, just in case
Nope didnt work
From this thread, there's this: pygame is written in C, so it needs to be compiled before it can be installed. setup.py tries to compiled it using Visual Studio Build Tools, and if they're not installed on your PC, it fails.But it says that it's just because it's not compiled for your version of python yet and you should downgrade, and that doesn't make sense here, since you already have 3.9, which 100% most definitely works with pygame. But the problem is something to do with that, it might be failing to find the compiled version, and resorting to compiling pygame itself, which it's not equipped to because of visual studio build tools. Maybe try adding them to your path and it might solve all your problems. Or read the rest of the thread something there might work idk
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.