I want to compile a python file to a standalone .exe programm using pyinstaller onefile. Running the python file, everything works fine, but running the .exe file, it throws the exception
ModuleNotFoundError: No module named 'matplotlib.backends.backend_svg'
I am using schemdraw, and schemdraw uses matplotlib.
Because I dont want matplotlib to open a window everytime I export an svg I use the backend "Agg" with matplotlib.
import matplotlib.backends.backend_tkagg
import matplotlib
matplotlib.use('Agg')
--onefile <file>
pyinstaller <file>
import matplotlib.backends.backend_tkagg
over import matplotlip
pip install matplotlib --upgrade --user
basicly this post. But since this isn't exactly my problem and none of it worked I am asking hereThanks in advance
Do you need to use Matplotlib for anything other than schemdraw? If not, you can set schemdraw to draw straight to SVG:
schemdraw.use('svg')
then it won't even go through Matplotlib.