[GH-ISSUE #248] Failed to determine matplotlib's data directory! #220

Closed
opened 2026-02-26 12:20:52 +03:00 by kerem · 3 comments
Owner

Originally created by @pedrobele on GitHub (Feb 27, 2022).
Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/248

Hello,

I have this error... my code (py) is very simple, only for testing...

import numpy as np
print('teste...')

File "C:\Anaconda3\lib\site-packages\pyinstaller-4.9-py3.9-win-amd64.egg\PyInstaller\hooks\hook-matplotlib.py", line 15, in
assert mpl_data_dir, "Failed to determine matplotlib's data directory!"
AssertionError: Failed to determine matplotlib's data directory!

Any ideias?

Originally created by @pedrobele on GitHub (Feb 27, 2022). Original GitHub issue: https://github.com/brentvollebregt/auto-py-to-exe/issues/248 Hello, I have this error... my code (py) is very simple, only for testing... import numpy as np print('teste...') File "C:\Anaconda3\lib\site-packages\pyinstaller-4.9-py3.9-win-amd64.egg\PyInstaller\hooks\hook-matplotlib.py", line 15, in <module> assert mpl_data_dir, "Failed to determine matplotlib's data directory!" AssertionError: Failed to determine matplotlib's data directory! Any ideias?
kerem 2026-02-26 12:20:52 +03:00
  • closed this issue
  • added the
    Stale
    label
Author
Owner

@brentvollebregt commented on GitHub (Feb 28, 2022):

Two issues here:

  1. PyInstaller is trying to include matplotlib even though it's not being used
  2. matplotlib's data directory has not been added

Since you are not using matplotlib, we can ignore 2 when solving 1. My recommendation is to use a virtual environment that contains only the libraries you need and auto-py-to-exe - make sure to run auto-py-to-exe from this virtual environment and not the environment containing all the other packages.

<!-- gh-comment-id:1054066815 --> @brentvollebregt commented on GitHub (Feb 28, 2022): Two issues here: 1. PyInstaller is trying to include matplotlib even though it's not being used 2. matplotlib's data directory has not been added Since you are not using matplotlib, we can ignore 2 when solving 1. My recommendation is to use a virtual environment that contains only the libraries you need and auto-py-to-exe - make sure to run auto-py-to-exe from this virtual environment and not the environment containing all the other packages.
Author
Owner

@github-actions[bot] commented on GitHub (Apr 30, 2022):

This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.

<!-- gh-comment-id:1113885258 --> @github-actions[bot] commented on GitHub (Apr 30, 2022): This issue is stale because it has been open for 60 days with no activity. Remove stale label or comment on this issue or it will be closed in 5 days.
Author
Owner

@github-actions[bot] commented on GitHub (May 6, 2022):

Closing issue due to no activity in more than 60 days.

<!-- gh-comment-id:1119176472 --> @github-actions[bot] commented on GitHub (May 6, 2022): Closing issue due to no activity in more than 60 days.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/auto-py-to-exe#220
No description provided.