2

I tried to install the pygame module and Homebrew described here.

By installing venvdotapp, I get the Error Message:

Sorry your Python wasn't build with --enable-Framework

I think I can ignore that if I use a VENV, which Pycharm does..

By running Pycharme with pygame I get this Error:

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pygame/__init__.py", line 81, in <module>
    from pygame.base import * # pylint: disable=wildcard-import; lgtm[py/polluting-import]
ImportError: dlopen(/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pygame/base.cpython-39-darwin.so, 2): no suitable image found.  Did find:
    /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pygame/base.cpython-39-darwin.so: mach-o, but wrong architecture
    /Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pygame/base.cpython-39-darwin.so: mach-o, but wrong architecture

I'm confused about that and don't know how to fix.

D_00
  • 1,440
  • 2
  • 13
  • 32
  • 1
    This post is M1 specific. I had problems to install pygame at Mac Intel but by adding the module inside Pycharme, works well. So, if I run the Intel Version of Pycharme, I can work with it but not if I use the AArch64 Version of Pycharme, which is a lot faster. So this is why I posted the "special" install Routine in my first post, but as I reported, venvdotapp installation don't work and Pycharme spits out those bones... – Karl-Heinz Skywalker Sep 19 '21 at 17:03
  • tysm for the answer. I am also sorry because I don't have much idea of what your question specifically ask for , I thought you were have problem installing pygame on mac. I will recommend it best for you to ask the person who made the instructions u followed : https://www.quora.com/How-do-you-install-Pygame-on-a-MacBook-M1?share=1 . @Karl-Heinz Skywalker – AbduRahman Sep 19 '21 at 17:57
  • Yes ist is a problem getting pygame run... with a M1 machine. By failing around I came a little bit further by installing pygame via Pycharm inside the Project venv but now pygame won't except png files, just bmp which should be related by the PIL / PILLOW (Python image library) pkg but they seemed to be installed correctly... – Karl-Heinz Skywalker Sep 20 '21 at 13:02
  • Ok, I found the same problem https://stackoverflow.com/questions/68972133/pygame-error-file-is-not-a-windows-bmp-file-on-m1-mac-running-mac-os-monteray – Karl-Heinz Skywalker Sep 20 '21 at 13:06
  • Did it answer your question? – AbduRahman Sep 20 '21 at 14:05

0 Answers0