When creating an executable file using PyInstaller, how can I bundle a specific Python interpreter and some library from specific versions?
I want to create an executable file from my .py script. My __main__.py
downloads some data from a website and transform them, then saves them in a folder as excel files.
And here are requirements.
- Use Python 3.6
For this, I found some related posts but never clear to me. My main.py needs Python3.6 to be executed, and the users of this .exe file won't necessarily have Python3.6, so I want to bundle this Python in the .exe file as well. But is just a single command python3 -m pyinstaller __main__.py
really enough? I'm not confident and I want to know what exactly I need to do.
- Use specific versions of libraries such as pandas==0.23, beautifulsoup4==4.9.1 etc.
I think I need to work with pure
in .spec
file as the documentation says "pure: pure python modules needed by the scripts". But I cannot find any documentation about what exactly I need to do make it include pandas==0.23, beautifulsoup4==4.9.1 etc.
Any help would be appreciated!