Skip to content

typing library no longer supported by PyInstaller #14

Open
@stumpyd123

Description

@stumpyd123

I was following along with the PyInstaller tutorial that goes along with this project, and I received an error.

$pyinstaller cli.py --onefile
The 'typing' package is an obsolete backport of a standard library package and is incompatible with PyInstaller. Please conda remove t>yping then try again.

I was able to use pip uninstall typing to remove typing, and then PyInstaller was able to create the executable, but the executable fails.

Here is the traceback when I ran the executable from the command line.

$cli.exe
Traceback (most recent call last):
  File "C:\Users\<user>\Downloads\Test2\reader\cli.py", line 1, in <module>
    from reader.__main__ import main
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 495, in exec_module
  File "reader\__init__.py", line 22, in <module>
  File "configparser.py", line 782, in get
  File "configparser.py", line 1153, in _unify_values
configparser.NoSectionError: No section: 'feed'
[244572] Failed to execute script 'cli' due to unhandled exception!

Link to PyInstaller tutorial:
https://realpython.com/pyinstaller-python/#debugging-pyinstaller-executables

Here is my environment after I removed typing:

# packages in environment at C:\Users\<user>\Anaconda3\envs\test:
#
# Name                    Version                   Build  Channel
altgraph                  0.17               pyhd3eb1b0_0
bzip2                     1.0.8                he774522_0
ca-certificates           2022.4.26            haa95532_0
certifi                   2020.6.20          pyhd3eb1b0_3
feedparser                6.0.8                    pypi_0    pypi
future                    0.18.2          py310haa95532_1
html2text                 2020.1.16                pypi_0    pypi
importlib-resources       5.7.1                    pypi_0    pypi
libffi                    3.4.2                h604cdb4_1
macholib                  1.14               pyhd3eb1b0_1
openssl                   1.1.1o               h2bbff1b_0
pefile                    2019.4.18                  py_0
pip                       21.2.4          py310haa95532_0
pycryptodome              3.12.0          py310h2bbff1b_0
pyinstaller               4.8             py310h8cc25b3_0
python                    3.10.4               hbb2ffb3_0
pywin32                   302             py310h2bbff1b_2
pywin32-ctypes            0.2.0           py310haa95532_1000
realpython-reader         1.0.0                    pypi_0    pypi
setuptools                61.2.0          py310haa95532_0
sgmllib3k                 1.0.0                    pypi_0    pypi
sqlite                    3.38.3               h2bbff1b_0
tk                        8.6.11               h2bbff1b_1
tzdata                    2022a                hda174b7_0
vc                        14.2                 h21ff451_1
vs2015_runtime            14.27.29016          h5e58377_2
wheel                     0.37.1             pyhd3eb1b0_0
wincertstore              0.2             py310haa95532_2
xz                        5.2.5                h8cc25b3_1
zlib                      1.2.12               h8cc25b3_2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions