简体   繁体   中英

Pyglet Module not found despite being installed

I am working on an M1 Mac with Python version 3.9.7. I used pip to install pyglet (1.5.21), which worked. However when trying to import pyglet in python scripts, the following error pops up:

ModuleNotFoundError: No module named 'pyglet'

I also tried installing pyglet version 1.5.16 using conda which results in the same error.

Other packages work just fine. Any help is highly appreciated!

我认为你应该重新安装 pip 以获得更新的版本

I also have M1 mac. Try using pip3 instead of pip to install pyglet. Could be you only have pip installed for python3 (which is pip3)

I was having errors with Python not finding the module/attributes - I resolved it by downloading the pyglet zip from github and saving it to the same folder that my .py file is in.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM