Last active
September 26, 2020 08:34
-
-
Save lucnap/fc3b67f6120fc26f8696064fec94de03 to your computer and use it in GitHub Desktop.
Compile python programs to Widows executable
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Install PyInstaller | |
if using Virtual Env (very likely) compile spcifying the folder of the modules | |
Example: | |
pyinstaller main.py --paths venv\Lib\site-packages --onefile | |
otherwise you will get an error of module not found when moving the executable to another machine | |
This is very useful when using libraries like MySQLdb for example | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment