classification
Title: Using Pyinstaller with (Anaconda) Python 3.7.3 needs PyQt5 even if not imported in code
Type: behavior Stage: resolved
Components: Windows Versions: Python 3.7
process
Status: closed Resolution: third party
Dependencies: Superseder:
Assigned To: Nosy List: Sameer Bobade, paul.moore, steve.dower, tim.golden, zach.ware
Priority: normal Keywords:

Created on 2019-06-27 07:26 by Sameer Bobade, last changed 2019-06-27 16:32 by steve.dower. This issue is now closed.

Files
File name Uploaded Description Edit
pyinstallerlog.zip Sameer Bobade, 2019-06-27 07:26 Log files from Pyinstaller
withpy3.7.3 -without PyQt5.txt Sameer Bobade, 2019-06-27 16:18
Messages (4)
msg346715 - (view) Author: Sameer Bobade (Sameer Bobade) Date: 2019-06-27 07:26
I am writing a test code with Python and tested that it works on both Python 3.7 and 3.7.3
The code uses tkinter, and does not use PyQT5
I use pyinstaller 3.4 I convert the python to exe.

With the same code and and same dependencies (including version number) - while converting code to exe using pyinstaller 3.4, with Python 3.7.3 - Pyinstaller asks for additional imports related to PyQt5 (and maybe more). This causes executable to expand in size with unwanted dependencies bundled in output.

Doing same thing with Python 3.7 removes the issue.
Not sure if this is Anaconda specific or general Python issue.

Both tests were done in virtual environment with Anaconda Python 3.7.3 as base.
Attached logs from pyinstaller for both versions.

Also reported to Anaconda - https://github.com/Anaconda-Platform/anaconda-project/issues/207
msg346744 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-27 15:29
This looks like because you have Qt installed in one environment and not the other, so when matplotlib imports it pyinstaller decides to include it.

You'll have to report this to pyinstaller. It's nothing to do with core Python.
msg346752 - (view) Author: Sameer Bobade (Sameer Bobade) Date: 2019-06-27 16:18
PyQt5 was installed when trying to make exe with Python 3.7.3 because without it pyinstaller will fail to produce output.

Added log without PyQt5 & Python 3.7.3 which fails to produce output.
Maybe this is issue of Matplotlib then? Not sure if versions are changed between the distribution.
msg346756 - (view) Author: Steve Dower (steve.dower) * (Python committer) Date: 2019-06-27 16:32
In any case, it's definitely pyinstaller and not CPython. Please report it on their issue tracker.
History
Date User Action Args
2019-06-27 16:32:33steve.dowersetstatus: open -> closed

messages: + msg346756
2019-06-27 16:18:24Sameer Bobadesetstatus: closed -> open
files: + withpy3.7.3 -without PyQt5.txt
messages: + msg346752
2019-06-27 15:29:16steve.dowersetstatus: open -> closed
resolution: third party
messages: + msg346744

stage: resolved
2019-06-27 07:26:24Sameer Bobadecreate