I am using a Mac with Catalina 10.15.2. I recently installed Python 3.7.3 using Pyenv. My interpreter is Komodo Edit 12.
I have installed pygame by running:
pip3 install pygame
My issue is with Pygame. Whenever I try to execute:
#!/usr/bin/env python3
import pygame
Komodo returns:
Traceback (most recent call last):
File "/Users/wetherman/Desktop/RandomPy/game.py", line 3, in <module>
import pygame
ModuleNotFoundError: No module named 'pygame'
The unusual part, I think, is when I type python3
in terminal, followed by import pygame
it seems to work completely fine. But, when I start the Python Unix Executable from /usr/bin/
, I get the same error that I got earlier in Komodo.
Fixed by changing: #!/usr/bin/env python3
To: #!/users/$(myaccountname)/.pyenv/versions/3.7.3/bin/python3