-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Impossible to build with matplotlib 3.3 on Python 3.7 and 3.8 #5004
Comments
Also happens on Fedora 32 with matplotlib 3.3:
As per the initial warning ( The issue can be temporarily fixed by manually moving the |
Well for starters:
But yes, it looks like @rokm is right. It's the data folder and that deprecation warning we've been putting off fixing has finally bit us. In which case the hook needs updating. I'll work on this. |
Yeah sorry I wrote it from memory but I used pyplot.plt of course. I ended up being able to make all of it work by reverting to a older matplotlib… I'll keep that for now as it reduces the amount of manual steps for distributing. And I'll update once the new hook is out. Thanks for taking the time to work on the hook! |
This alters where matplotlib's ``mpl-data`` folder is put and how it is found at runtime. This is to support matplotlib>=3.3.0 without breaking older versions. Fixes pyinstaller#5004. Previously, the data folder was places in the app's root and a runtime hook injected the environment variable ``MATPLOTLIBDATA`` to point to said folder. This variable was deprecated in ``matplotlib 3.1.0`` and now raises an error in ``matplotlib 3.3.0``. With this commit, hook-matplotlib.py puts the ``mpl-data`` folder where matplotlib is now (almost) hard-coded to expect it to be; which is in the parent folder of wherever ``matplotlib.__file__`` points to. With this move, we no longer need a runtime hook. When I say `almost hard-coded` above, I mean it appears like matplotlib meant to make it flexible but have mangled it as it now raises a ``NameError`` (see issue pyinstaller#5004) which presumably isn't intentional.
Pin matplotlib at 3.2.2 pending fix for pyinstaller/pyinstaller#5004
This alters where matplotlib's ``mpl-data`` folder is put and how it is found at runtime. This is to support matplotlib>=3.3.0 without breaking older versions. Fixes pyinstaller#5004. Previously, the data folder was places in the app's root and a runtime hook injected the environment variable ``MATPLOTLIBDATA`` to point to said folder. This variable was deprecated in ``matplotlib 3.1.0`` and now raises an error in ``matplotlib 3.3.0``. With this commit, hook-matplotlib.py puts the ``mpl-data`` folder where matplotlib is now (almost) hard-coded to expect it to be; which is in the parent folder of wherever ``matplotlib.__file__`` points to. With this move, we no longer need a runtime hook. When I say `almost hard-coded` above, I mean it appears like matplotlib meant to make it flexible but have mangled it as it now raises a ``NameError`` (see issue pyinstaller#5004) which presumably isn't intentional.
- For now, mpl is pinned at version 3.2.2 to avoid issues with pyinstaller. See pyinstaller/pyinstaller#5004 for more details.
This alters where matplotlib's ``mpl-data`` folder is put and how it is found at runtime. This is to support matplotlib>=3.3.0 without breaking older versions. Fixes pyinstaller#5004. Previously, the data folder was places in the app's root and a runtime hook injected the environment variable ``MATPLOTLIBDATA`` to point to said folder. This variable was deprecated in ``matplotlib 3.1.0`` and now raises an error in ``matplotlib 3.3.0``. With this commit, hook-matplotlib.py puts the ``mpl-data`` folder where matplotlib is now (almost) hard-coded to expect it to be; which is in the parent folder of wherever ``matplotlib.__file__`` points to. With this move, we no longer need a runtime hook. When I say `almost hard-coded` above, I mean it appears like matplotlib meant to make it flexible but have mangled it as it now raises a ``NameError`` (see issue pyinstaller#5004) which presumably isn't intentional.
This alters where matplotlib's ``mpl-data`` folder is put and how it is found at runtime. This is to support matplotlib>=3.3.0 without breaking older versions. Fixes pyinstaller#5004. Previously, the data folder was places in the app's root and a runtime hook injected the environment variable ``MATPLOTLIBDATA`` to point to said folder. This variable was deprecated in ``matplotlib 3.1.0`` and now raises an error in ``matplotlib 3.3.0``. With this commit, hook-matplotlib.py puts the ``mpl-data`` folder where matplotlib is now (almost) hard-coded to expect it to be; which is in the parent folder of wherever ``matplotlib.__file__`` points to. With this move, we no longer need a runtime hook. When I say `almost hard-coded` above, I mean it appears like matplotlib meant to make it flexible but have mangled it as it now raises a ``NameError`` (see issue pyinstaller#5004) which presumably isn't intentional.
This alters where matplotlib's ``mpl-data`` folder is put and how it is found at runtime. This is to support matplotlib>=3.3.0 without breaking older versions. Fixes pyinstaller#5004. Previously, the data folder was places in the app's root and a runtime hook injected the environment variable ``MATPLOTLIBDATA`` to point to said folder. This variable was deprecated in ``matplotlib 3.1.0`` and now raises an error in ``matplotlib 3.3.0``. With this commit, hook-matplotlib.py puts the ``mpl-data`` folder where matplotlib is now (almost) hard-coded to expect it to be; which is in the parent folder of wherever ``matplotlib.__file__`` points to. With this move, we no longer need a runtime hook. When I say `almost hard-coded` above, I mean it appears like matplotlib meant to make it flexible but have mangled it as it now raises a ``NameError`` (see issue pyinstaller#5004) which presumably isn't intentional.
This alters where matplotlib's ``mpl-data`` folder is put and how it is found at runtime. This is to support matplotlib>=3.3.0 without breaking older versions. Fixes #5004. Previously, the data folder was places in the app's root and a runtime hook injected the environment variable ``MATPLOTLIBDATA`` to point to said folder. This variable was deprecated in ``matplotlib 3.1.0`` and now raises an error in ``matplotlib 3.3.0``. With this commit, hook-matplotlib.py puts the ``mpl-data`` folder where matplotlib is now (almost) hard-coded to expect it to be; which is in the parent folder of wherever ``matplotlib.__file__`` points to. With this move, we no longer need a runtime hook. When I say `almost hard-coded` above, I mean it appears like matplotlib meant to make it flexible but have mangled it as it now raises a ``NameError`` (see issue #5004) which presumably isn't intentional.
for me the solution presented here works add the path to the matplotlib and matplotlib-base to the data section in the spec file . This seems to have fixed the issue. for now.Although i still get the deprecation warnings. |
@VenkatKaranam We've fixed this now. You should be able to just: pip install -U https://github.com/pyinstaller/pyinstaller/archive/develop.zip Then rebuild using the |
Thank you. Will try it out.
Regards,
UmaVenkat Karanam, M.S.M.E SUNY Buffalo
Technical Analyst-CAE
Mechatronics
Magna
521 Newpark Blvd
Newmarket,ON, L3Y 4X7, Canada
OFFICE: +1-905-898-6744 ext 2231
MOBILE: +1 6476793681
Venkat.Karanam@magna.com
From: Brénainn Woodsend <notifications@github.com>
Sent: Monday, November 2, 2020 3:28 PM
To: pyinstaller/pyinstaller <pyinstaller@noreply.github.com>
Cc: Karanam, Venkat <Venkat.Karanam@magna.com>; Mention <mention@noreply.github.com>
Subject: Re: [pyinstaller/pyinstaller] Impossible to build with matplotlib 3.3 on Python 3.7 and 3.8 (#5004)
WARNING: This e-mail originated from outside of Magna. Be cautious with links and attachments.
…________________________________
@VenkatKaranam<https://github.com/venkatkaranam> We've fixed this now. You should be able to just:
pip install -U https://github.com/pyinstaller/pyinstaller/archive/develop.zip
Then rebuild using the --clean option.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub<#5004 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AROYKSILPQ2TCGTTG66EFSDSN4I3VANCNFSM4O6X23RQ>.
|
I have detected an error when you install Pathlib. If you have Pathlib installed the error reported in this post starts to happen with every version of Matplotlib I have tried I don´t know how to fix it, but It seems fair to report here Regards |
|
…#5006) This alters where matplotlib's ``mpl-data`` folder is put and how it is found at runtime. This is to support matplotlib>=3.3.0 without breaking older versions. Fixes pyinstaller#5004. Previously, the data folder was places in the app's root and a runtime hook injected the environment variable ``MATPLOTLIBDATA`` to point to said folder. This variable was deprecated in ``matplotlib 3.1.0`` and now raises an error in ``matplotlib 3.3.0``. With this commit, hook-matplotlib.py puts the ``mpl-data`` folder where matplotlib is now (almost) hard-coded to expect it to be; which is in the parent folder of wherever ``matplotlib.__file__`` points to. With this move, we no longer need a runtime hook. When I say `almost hard-coded` above, I mean it appears like matplotlib meant to make it flexible but have mangled it as it now raises a ``NameError`` (see issue pyinstaller#5004) which presumably isn't intentional.
…#5006) This alters where matplotlib's ``mpl-data`` folder is put and how it is found at runtime. This is to support matplotlib>=3.3.0 without breaking older versions. Fixes pyinstaller#5004. Previously, the data folder was places in the app's root and a runtime hook injected the environment variable ``MATPLOTLIBDATA`` to point to said folder. This variable was deprecated in ``matplotlib 3.1.0`` and now raises an error in ``matplotlib 3.3.0``. With this commit, hook-matplotlib.py puts the ``mpl-data`` folder where matplotlib is now (almost) hard-coded to expect it to be; which is in the parent folder of wherever ``matplotlib.__file__`` points to. With this move, we no longer need a runtime hook. When I say `almost hard-coded` above, I mean it appears like matplotlib meant to make it flexible but have mangled it as it now raises a ``NameError`` (see issue pyinstaller#5004) which presumably isn't intentional.
@bwoodsend, hi i am relatively new to coding. how would i implement the "--clean option" you mentioned? |
|
Thank you. I have solved the same problem by the way. |
Description of the issue
Trying a simple program main.py
Running the application created with pyinstaller --hiddenimport='pkg_resources.py2_warn' main.py
I get:
Context information (for bug reports)
pyinstaller --version
:3.6 and 4.0-dev0
What solves it
Reverting to matplotlib 3.2.2 resolve the issue (temporarily).
The text was updated successfully, but these errors were encountered: