matplotlibrc not found error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

matplotlibrc not found error

Mordecai Veldt
I have a small app that is built with TKinter in python3.9. It uses matplotlib to put a plot in the windows.
I can pyinstaller -F main.py and it completes, but if I try to run the packed exe, it crashes looking in a random appdata folder for matplotlibrc.
How can I get this this to work without looking for a matplotlibrc?

Traceback (most recent call last):
  File "main.py", line 6, in <module>
  File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
  File "<frozen importlib._bootstrap>", line 986, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 680, in _load_unlocked
  File "PyInstaller\loader\pyimod03_importers.py", line 531, in exec_module
  File "matplotlib\__init__.py", line 820, in <module>
  File "matplotlib\__init__.py", line 725, in _rc_params_in_file
  File "contextlib.py", line 117, in __enter__
  File "matplotlib\__init__.py", line 703, in _open_file_or_url
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\morde\\AppData\\Local\\Temp\\_MEI242442\\matplotlib\\mpl-data\\matplotlibrc'

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/552151c0-226a-4fb4-98d8-96698f2a22b2n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: matplotlibrc not found error

bwoodsend

It crashes in some random appdata folder because that’s how onefile works - it unpacks itself into a temporary folder before running. As for matplotlib - what versions of matplotlib and PyInstaller are you using? There have been a couple of fixes to PyInstaller in the last few months. matplotlib 3.3 requires PyInstaller 4.1 and matplotlib 3.4 requires 5568 which hasn’t been released yet so you will have to install PyInstaller from Github.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/3b49d5d4-c629-4f75-b5d1-14905d8b471fn%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: matplotlibrc not found error

Mordecai Veldt
matplotlib 3.4.1
pyinstaller 4.2
I got it to work by putting a matplotlibrc copy in my script folder. I think it got picked up and packed so that it gets into the right place in the onefile unpack.

                        Mordecai Veldt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A man has joy in an apt answer,
         And how delightful is a timely word! Proverbs 15:23 NASB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


On Tue, Apr 6, 2021 at 11:37 AM bwoodsend <[hidden email]> wrote:

It crashes in some random appdata folder because that’s how onefile works - it unpacks itself into a temporary folder before running. As for matplotlib - what versions of matplotlib and PyInstaller are you using? There have been a couple of fixes to PyInstaller in the last few months. matplotlib 3.3 requires PyInstaller 4.1 and matplotlib 3.4 requires 5568 which hasn’t been released yet so you will have to install PyInstaller from Github.

--
You received this message because you are subscribed to a topic in the Google Groups "PyInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyinstaller/IfyyRcj1pGk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/3b49d5d4-c629-4f75-b5d1-14905d8b471fn%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/CABQnUNA58Z%3Don8yjn%3Dw1bydXXuLCNtC-jhihzXFjrcaFDk_Xww%40mail.gmail.com.
Reply | Threaded
Open this post in threaded view
|

Re: matplotlibrc not found error

bwoodsend

matplotlib 3.4.1
pyinstaller 4.2

Yeah, those two won’t work together. Try with the development version:

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

Then rebuild but add the --clean option.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/4ce65534-fd45-4aac-8ce4-fe041aaaf5d0n%40googlegroups.com.
Reply | Threaded
Open this post in threaded view
|

Re: matplotlibrc not found error

Mordecai Veldt
Thank you, with the development version, the compiled one file was only 55Mb instead of 134Mb
                        Mordecai Veldt
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
A man has joy in an apt answer,
         And how delightful is a timely word! Proverbs 15:23 NASB
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


On Wed, Apr 7, 2021 at 4:37 AM bwoodsend <[hidden email]> wrote:

matplotlib 3.4.1
pyinstaller 4.2

Yeah, those two won’t work together. Try with the development version:

pip install https://github.com/pyinstaller/pyinstaller/archive/develop.zip

Then rebuild but add the --clean option.

--
You received this message because you are subscribed to a topic in the Google Groups "PyInstaller" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/pyinstaller/IfyyRcj1pGk/unsubscribe.
To unsubscribe from this group and all its topics, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/4ce65534-fd45-4aac-8ce4-fe041aaaf5d0n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "PyInstaller" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/pyinstaller/CABQnUNDfc_42njshA%3DzBjPuUmpf%2ByHPTRv%2Bvenu0xeY%3DQyRFhA%40mail.gmail.com.