#πŸ”’ Having trouble with installing pygame and OpenGL acceralerate

34 messages Β· Page 1 of 1 (latest)

quick loomBOT
#

@pastel grotto

Python help channel opened

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.

copper jewel
#

Are you getting errors?

pastel grotto
#

it didn't post one sec

copper jewel
#

You can't send files here

#

!paste for large text

quick loomBOT
#
Pasting large amounts of code

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.

pastel grotto
#

!past

#

that file is for pygame

copper jewel
#

Which python version do you have?

pastel grotto
#
Python 3.9.19 (a2113ea87262, Apr 21 2024, 08:21:29)
[PyPy 7.3.16 with MSC v.1929 64 bit (AMD64)]
copper jewel
#

Huh, it should work then. I wasn't sure pygame supported 3.12 but for 3.9 it sure does

pastel grotto
#

i just got a new pc and before this never had an issue

#

could not actiavating window be a problem?

copper jewel
#

Do you have python installed from Microsoft store?

copper jewel
pastel grotto
#

not the microsoft store. But i downloaded it from the offical python website

copper jewel
#

Yeah, that's the one you want (from the official site)

pastel grotto
#

i thought it was a problem with Cython

copper jewel
#

And the error from gl accelerate is the same?

pastel grotto
#

no

copper jewel
#

Oh, what version is your pip tho?

#

Try upgrading to to the latest one if possible

pastel grotto
#
  β”œΓΉ 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

copper jewel
#

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

copper jewel
#

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

quick loomBOT
#
Python help channel closed

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.