Pyinstaller Import Module



I have a fully working Python program that uses the following imports:

Pyinstaller module

In the bad case, when I have dynamic import, I add -hiddenimport flag, PyInstaller run detects all submodules (again, with the hook) but will not detect submodule's dependencies. You can see that there's a huge difference in the number of modules went into each one of the binaries. Hidden-import=Pillow -hidden-import='PIL' -hidden-import='Pillow' My script uses the following line of code in regards to the PIL module: from PIL import Image, ImageTk Everything works fine in the script, it is only when I use pyinstaller that I have a problem. PyInstaller can be imported in your Python code and used as a library, but you’ll likely only use it as a CLI tool. You’ll use the library interface if you create your own hook files. You’ll increase the likelihood of PyInstaller’s defaults creating an executable if.

However, when I try to compile it to an executable using PyInstaller, I get the following errors:

PyInstaller is a module used to bundle python apps in a single package along with all the dependencies. The user can then run the package app without a python interpreter or any modules. It correctly bundles many major packages like numpy, Django, OpenCv and others. Some important points to remember: Pyinstaller supports Python 2.7 and Python 3.3+. Files for pyinstaller-setuptools, version 2019.3; Filename, size File type Python version Upload date Hashes; Filename, size pyinstallersetuptools-2019.3-py3-none-any.whl (3.7 kB) File type Wheel Python version py3 Upload date Aug 31, 2019.

Note: May not be perfect, as it was captured by my reaction times and a screenshot:

I read the error, and tried to import urllib3 in my code as well. That returned the same errors as well. I'm thinking it's down to the location of urllib3 in relation to requests, but how can I solve this? I read online about FileDialog, and again it returned the same error.

Any pointers on this would be much appreciated.

Edit: It's not just the queue import problem, it's more of how to change the paths the library requests is trying to import from and how pyinstaller is going to get those paths in the first instance.

Edit 2: Ok, maybe I should ask how PyInstaller compiles the dependencies it finds and where it stores them? I could then give it a shot myself.

Edit 3: Through hours of crawling the web I believe I might be after hidden imports. How do those works for getting urllib3 in?

Latest version

Released:

Use pyinstaller in your setup.py

Project description

Project details


Release historyRelease notifications | RSS feed

Pyinstaller Import Modules

2019.3

2019.2

Pyinstaller

2019.1

2019.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyinstaller-setuptools, version 2019.3
Filename, sizeFile typePython versionUpload dateHashes
Filename, size pyinstaller_setuptools-2019.3-py3-none-any.whl (3.7 kB) File type Wheel Python version py3 Upload dateHashes
Filename, size pyinstaller_setuptools-2019.3.tar.gz (2.3 kB) File type Source Python version None Upload dateHashes
Close

Hashes for pyinstaller_setuptools-2019.3-py3-none-any.whl

Hashes for pyinstaller_setuptools-2019.3-py3-none-any.whl
AlgorithmHash digest
SHA25645332453b24b957de88766726104b3dc7dea5d6a6ef56e9bc1a25f53450727d1
MD555f326c39fc828ec5ea4fb1a1dc2f69f
BLAKE2-2565ee5bf940de8d3869d5f17492493fb0527ca62ca9e4b8207b4da914baf1f51eb

Pyinstaller Import Module Error

Close

Pyinstaller Hidden Imports

Hashes for pyinstaller_setuptools-2019.3.tar.gz

Pyinstaller Import Module

Using Pyinstaller

Hashes for pyinstaller_setuptools-2019.3.tar.gz
AlgorithmHash digest
SHA2568028e9214cf53f99dd7eaa647da751f92e0446b45900987bc1c58f58e371c047
MD52f1386b3b26287b5f5527d8c94b85c2a
BLAKE2-2564fbbe4c88f3ddc8ceccdb12017f063b3a3f67b2143ddc4066f436345a3e3c0de




Comments are closed.