2

This is stemming from a previous question I asked last night here. In the matplotlib API there is the following call to return the path to matplotlib data:

matplotlib.get_data_path()

Where does this path come from? I printed the Python environment variables using:

print(os.environ)

and I do not find a similar path. There is nothing that I can see within the matplotlib API to change this path, like a matplotlib.set_data_path() method. My problem is that the Navigation Toolbar icons (using a GTK backend) from a frozen script (using PyInstaller) are not showing up on some computers, and the culprit seems to be this path not being correct. Any assistance would be appreciated.

2
  • And is there no variable for storing the data path, something like matplotlib.data_path? Commented Nov 4, 2021 at 17:47
  • For anyone looking into this problem, here is the function definition for get_data_path. My best guess is that the absolute path gets logged and then frozen. Maybe this could be resolved through monkey patching to log the relative path? Maybe removing the decorator would do the trick, too, as then the absolute path is never frozen. Commented Nov 5, 2021 at 15:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.