I have been trying to build .exe file using pyinstaller in windows 10. It worked, but the size of the exe file is ~212 MB, even by using a venv (as in here). I thought it mi
Finally, after a lot of researching, could solve my problem:
Note: You can build virtualenv and do pyinstaller in them.
My previous tries which used anaconda resulted in file of 212 MB in size. This process generated a .exe file of size 27 MB (Importing only pandas module).
I ran into a similar problem and found PyCharms virtualenv manager very helpful. https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html
This just necessitated downloading python from python.org and linking the virtual environment to this interpreter, rather than the conda interpreter (otherwise it will throw strange SSL errors).
This seems to allow neat parallel use of conda and virtualenv.