PyInstaller: Unnecessary Modules | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

PyInstaller: Unnecessary Modules

I have made a 2 level directory python project, and have converted to onedir console-based exe using Auto-py-to-exe which uses PyInstaller. The directory is pretty unorganised as expected but I find that there are many folder named "PyQt5", "PIL", "cv2", "scipy", "PySide2", etc... These are the names of modules, I have them installed in my system but did not use them in my project. What I do not understand is, Even though I haven't used these modules in my project, these directories are there in onedir exe, Why? Is it safe to delete them?

21st Oct 2021, 9:03 AM
Arun Bhattacharya
Arun Bhattacharya - avatar
3 Answers
0
Well Arun Bhattacharya ,I suspect that your problem may be caused by the fact that you did not use a virtual environment .Whereby pycharm creates this environment automatically , I'm not entirely sure. because I'm not there to see it in person . If ur don't know what a virtual environment Is Click this: https://www.section.io/engineering-education/introduction-to-virtual-environments-and-dependency-managers/
23rd Oct 2021, 4:44 AM
Richard
Richard - avatar
0
Richard, does it really have any connection with the IDE... btw I am using Visual Studio Code
22nd Oct 2021, 12:03 PM
Arun Bhattacharya
Arun Bhattacharya - avatar
- 1
If ur want help tell us which IDE ur using
21st Oct 2021, 9:12 PM
Richard
Richard - avatar