question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

does not work with PyInstaller

See original GitHub issue

I wanted to use the nicer traceback of this application for one of my projects. Unfortunately I can’t get this to run on Windows. I have to put the application into an exe and get problems with the import of rich. Once I insert this source code into my program, I cannot start it after the packing process.

from rich.traceback import install
install()

I get the following error message on the console.

Traceback (most recent call last):
  File "venv\Lib\site-packages\PyInstaller\loader\rthooks\pyi_rth_pkgres.py", line 13, in <module>
    import pkg_resources as res
  File "c:\users\vmuser\pycharmprojects\logdings\venv\lib\site-packages\PyInstaller\loader\pyimod03_importers.py", line 623, in exec_module
    exec(bytecode, module.__dict__)
  File "lib\site-packages\pkg_resources\__init__.py", line 86, in <module>
ModuleNotFoundError: No module named 'pkg_resources.py2_warn'
[5020] Failed to execute script pyi_rth_pkgres

Since @pyinstaller is a very big project, I wanted to ask here first how to get it running.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9

github_iconTop GitHub Comments

2reactions
frankenstein91commented, May 7, 2020

Thank you for wishing good luck… it helped. The answer ist to downgrade setuptools. https://github.com/pypa/setuptools/issues/1963#issuecomment-573675633

0reactions
willmcgugancommented, May 7, 2020

Good luck. Google is your friend. If you find a solution, post it here for future developers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

PyInstaller .exe file not working - Stack Overflow
Show activity on this post. Try to open command prompt and drag exe into it and press enter, that way you will catch...
Read more >
When Things Go Wrong — PyInstaller 5.7.0 documentation
PyInstaller sometimes terminates by raising a Python exception. In most cases the reason is clear from the exception message, for example “Your system...
Read more >
How to use PyInstaller to create Python executables - InfoWorld
The most common reason a PyInstaller package fails is that PyInstaller failed to bundle a required file. Such missing files fall into a...
Read more >
Vosk does not work with pyinstaller · Issue #602 - GitHub
Hi, I could make a script that works as a py file, but when I try to run pyinstaller to get an exe...
Read more >
Using PyInstaller to Easily Distribute Python Applications
The most common problem you'll see is ImportError exceptions if PyInstaller couldn't properly detect all your dependencies. As mentioned before, this can happen ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found