I can't install pygamezero on python 3.11 using pip

Hello, I am trying to install a python library called pygamezero on python 3.11 using the pip tool but everytime i try installing i get the following error:
Code:
$ pip install pgzero
Defaulting to user installation because normal site-packages is not writeable
Collecting pgzero
  Using cached pgzero-1.2.1-py3-none-any.whl.metadata (2.3 kB)
Collecting pygame~=2.0 (from pgzero)
  Using cached pygame-2.6.1.tar.gz (14.8 MB)
  Installing build dependencies ... done
  Getting requirements to build wheel ... done
  Preparing metadata (pyproject.toml) ... done
Requirement already satisfied: numpy in /usr/local/lib/python3.11/site-packages (from pgzero) (1.26.4)
Using cached pgzero-1.2.1-py3-none-any.whl (71 kB)
Building wheels for collected packages: pygame
  Building wheel for pygame (pyproject.toml) ... error
  error: subprocess-exited-with-error
  
  × Building wheel for pygame (pyproject.toml) did not run successfully.
  │ exit code: 1
  ╰─> [110 lines of output]
      src_c/_sdl2/video.c:30078:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
       30078 |                     CYTHON_FALLTHROUGH;
             |                     ^
      src_c/_sdl2/video.c:574:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
        574 |       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
            |                                  ^
      src_c/_sdl2/video.c:30089:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
       30089 |                     CYTHON_FALLTHROUGH;
             |                     ^
      src_c/_sdl2/video.c:574:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
        574 |       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
            |                                  ^
      src_c/_sdl2/video.c:30211:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
       30211 |                     CYTHON_FALLTHROUGH;
             |                     ^
      src_c/_sdl2/video.c:574:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
        574 |       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
            |                                  ^
      src_c/_sdl2/video.c:30222:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
       30222 |                     CYTHON_FALLTHROUGH;
             |                     ^
      src_c/_sdl2/video.c:574:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
        574 |       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
            |                                  ^
      4 warnings generated.
      src_c/SDL_gfx/SDL_gfxPrimitives.c:558:20: warning: unused variable 'sA' [-Wunused-variable]
        558 |         Uint8 sR, sG, sB, sA;
            |                           ^~
      src_c/SDL_gfx/SDL_gfxPrimitives.c:2505:25: warning: variable 'wgtcompmask' set but not used [-Wunused-but-set-variable]
       2505 |         Uint32 erracctmp, wgt, wgtcompmask;
            |                                ^
      2 warnings generated.
      src_c/_sprite.c:41520:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
       41520 |                     CYTHON_FALLTHROUGH;
             |                     ^
      src_c/_sprite.c:574:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
        574 |       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
            |                                  ^
      src_c/_sprite.c:41531:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
       41531 |                     CYTHON_FALLTHROUGH;
             |                     ^
      src_c/_sprite.c:574:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
        574 |       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
            |                                  ^
      src_c/_sprite.c:41659:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
       41659 |                     CYTHON_FALLTHROUGH;
             |                     ^
      src_c/_sprite.c:574:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
        574 |       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
            |                                  ^
      src_c/_sprite.c:41670:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
       41670 |                     CYTHON_FALLTHROUGH;
             |                     ^
      src_c/_sprite.c:574:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
        574 |       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
            |                                  ^
      src_c/_sprite.c:41935:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
       41935 |                     CYTHON_FALLTHROUGH;
             |                     ^
      src_c/_sprite.c:574:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
        574 |       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
            |                                  ^
      src_c/_sprite.c:41946:21: warning: fallthrough annotation in unreachable code [-Wunreachable-code-fallthrough]
       41946 |                     CYTHON_FALLTHROUGH;
             |                     ^
      src_c/_sprite.c:574:34: note: expanded from macro 'CYTHON_FALLTHROUGH'
        574 |       #define CYTHON_FALLTHROUGH __attribute__((fallthrough))
            |                                  ^
      6 warnings generated.
      src_c/display.c:399:9: warning: unknown pragma ignored [-Wunknown-pragmas]
        399 | #pragma PG_WARN(hardcoding wm_available to 1)
            |         ^
      src_c/display.c:400:9: warning: unknown pragma ignored [-Wunknown-pragmas]
        400 | #pragma PG_WARN(setting available video RAM to 0 KB)
            |         ^
      src_c/display.c:975:9: warning: unknown pragma ignored [-Wunknown-pragmas]
        975 | #pragma PG_WARN(Not setting bpp ?)
            |         ^
      src_c/display.c:976:9: warning: unknown pragma ignored [-Wunknown-pragmas]
        976 | #pragma PG_WARN(Add mode stuff.)
            |         ^
      src_c/display.c:1414:9: warning: unknown pragma ignored [-Wunknown-pragmas]
       1414 | #pragma PG_WARN(Ignoring most flags)
            |         ^
      src_c/display.c:1468:9: warning: unknown pragma ignored [-Wunknown-pragmas]
       1468 | #pragma PG_WARN(Ignoring flags)
            |         ^
      src_c/display.c:2617:9: warning: unknown pragma ignored [-Wunknown-pragmas]
       2617 | #pragma PG_WARN(At some point should add GC slot functions.)
            |         ^
      7 warnings generated.
      src_c/surface.c:1677:9: warning: unknown pragma ignored [-Wunknown-pragmas]
       1677 | #pragma PG_WARN("srcsurf doesn't actually do anything?")
            |         ^
      1 warning generated.
      In file included from src_c/_camera.c:37:
      src_c/camera.h:54:10: fatal error: 'linux/videodev2.h' file not found
         54 | #include <linux/videodev2.h>
            |          ^~~~~~~~~~~~~~~~~~~
      1 error generated.
      Skipping Cython compilation
      
      ---
      For help with compilation see:
          [URL]https://www.pygame.org/wiki/Compilation[/URL]
      To contribute to pygame development see:
          [URL]https://www.pygame.org/contribute.html[/URL]
      ---
      
      error: command '/usr/bin/cc' failed with exit code 1
      [end of output]
  
  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pygame
Failed to build pygame                                                                                       
ERROR: Could not build wheels for pygame, which is required to install pyproject.toml-based projects.
I can install other libraries using pip like custom tkinter but pygame zero didn't works can someone help me?
 
src_c/camera.h:54:10: fatal error: 'linux/videodev2.h' file not found
If you try installing Python modules/apps via Pip you need to meet the requirements which means that you may need to install non-Python dependencies first.
So you need to know which dependency provides the missing file and if that is installed in the proper location required by FreeBSD. If such a dependency is available in the FreeBSD package repository you may just install that.

See https://stackoverflow.com/questions...such-file-or-directory-opencv-on-ubuntu-11-04
 
Sorry if I am too late but I just re-installed FreeBSD in my computer, and now I can't discover which packages I had installed last time. Just by looking the log I sent, can you guess which packages I need to install?
 
Back
Top