I am trying to use Pyinstaller to make my .py to .exe.
I used >> pyinstaller --onefile -w main.py  to generate files and an exe.
But when I tried to run it by terminal in PyCharm, these error comes out:

Traceback (most recent call last):
  File "main.py", line 1, in <module>
    import Setting
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/PyInstaller/loader/pyimod03_importers.py",
 
line 627, in exec_module
    exec(bytecode, module.__dict__)
  File "Setting.py", line 1, in <module>
    import pygame
ModuleNotFoundError: No module named 'pygame'
[5458] Failed to execute script main

I have added 'pygame' inside hiddenimports and the absolute path of pygame 
folder(something like '....../venv/lib/python3.7/site-packages/pygame/') 
inside pathex in my main.spec.
These are the solutions that I can find from google but it doesn't work. 
Same error just comes out again :(

I've tried import Pygame in just Hello World but still having error.

Any can help me?

-- 
You received this message because you are subscribed to the Google Groups 
"PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pyinstaller/7e96a722-a5ae-4a46-a8de-423e35c3bd39%40googlegroups.com.

Reply via email to