I run my script in virtualenv. Python version is 3.5.
Add a line:
backend: TkAgg
in file:
~/.matplotlib/matplotlibrc
This solved the problem.
If you want to know more about why adding this solves the problem, you can read about customizing matplotlib’s backend. And TkAgg solves this issue because of it’s dependency with Tkinter.
Related Posts:
- How to uninstall Python 2.7 on a Mac OS X 10.6.4?
- pip or pip3 to install packages for Python 3?
- Python can’t find module NLTK
- How can I run python in terminal on a mac?
- RuntimeWarning: invalid value encountered in divide
- Updating Python on Mac
- How do I upgrade to Python 3.6 with conda?
- Unable to plot Double Bar, Bar plot using pyplot for ndarray
- How to change default Python version?
- ImportError: No module named sklearn (Python)
- How to change default Python version?
- What version of Python is on my Mac?
- ModuleNotFoundError: No module named ‘matplotlib’
- Change figure size and figure format in matplotlib
- How can I install a previous version of Python 3 in macOS using homebrew?
- boto3 python 2.7 ImportError: No module named boto3 USER_BASE USER_SITE site packages doesn’t exist
- Python: source code string cannot contain null bytes
- How to install pip for Python 3 on Mac OS X?
- Kill a python process
- Homebrew brew doctor warning about /Library/Frameworks/Python.framework, even with brew’s Python installed
- bash: pip: command not found
- Error: ‘int’ object is not subscriptable – Python
- How do I compare two strings in python?
- Purpose of “%matplotlib inline”
- python – how to get the data from an plt.imshow()?
- Pip freeze vs. pip list
- How do I install pip on macOS or OS X?
- ImportError: No module named pandas. Pandas installed pip
- ValueError: operands could not be broadcast together with shapes (5,) (30,)
- matplotlib savefig() plots different from show()
- WinError 2 The system cannot find the file specified (Python)
- How do I draw a grid onto a plot in Python?
- Could not find a version that satisfies the requirement tensorflow
- Local variable referenced before assignment?
- Plot logarithmic axes with matplotlib in python
- python pip – install from local dir
- How to pip or easy_install tkinter on Windows
- What is the meaning of [:] in python [duplicate]
- SocketException: Address already in use MONGODB
- pandas DataFrame “no numeric data to plot” error
- socket.error: [Errno 48] Address already in use
- Why is the apt-get function not working in the terminal on Mac OS X v10.9 (Mavericks)?
- Permission denied error by installing matplotlib
- Updating matplotlib in virtualenv with pip
- You don’t have write permissions for the /Library/Ruby/Gems/2.3.0 directory. (mac user)
- Remove list from list in Python
- Where to find Application Loader app in Mac?
- Unzip all zipped files in a folder to that same folder using Python 2.7.5
- How do you change the size of figures drawn with Matplotlib?
- Improve subplot size/spacing with many subplots in matplotlib
- How do I plot only a table in Matplotlib?
- How can I open the Atom editor from the command line in OS X?
- Python equivalent to ‘hold on’ in Matlab
- Create 3D array using Python
- OS X Framework Library not loaded: ‘Image not found’
- How to plot time series in python
- reducing number of plot ticks
- Installing cgdb on a mac os x
- Pyspark: Exception: Java gateway process exited before sending the driver its port number
- How can I Remove .DS_Store files from a Git repository?
- Virtualenv Command Not Found
- ValueError: Unknown projection ‘3d’ (once again)
- How to detect key presses?
- Display an image with Python
- -bash: export: `=’: not a valid identifier
- How to save a Seaborn plot into a file
- TypeError: ‘_io.TextIOWrapper’ object is not subscriptable
- Scatter plot colorbar – Matplotlib
- matplotlib: how to draw a rectangle on image
- bbox_to_anchor and loc in matplotlib
- Split a python list into other “sublists” i.e smaller lists
- psql: FATAL: role “postgres” does not exist
- If list index exists, do X
- Seaborn Lineplot Module Object Has No Attribute ‘Lineplot’
- Installation of pygame with Anaconda
- sed command with -i option failing on Mac, but works on Linux
- urllib and “SSL: CERTIFICATE_VERIFY_FAILED” Error
- matplotlib: plot multiple columns of pandas data frame on the bar chart
- Run script on mac prompt “Permission denied”
- How can I copy a Python string?
- Could not install packages due to an EnvironmentError: [Errno 13]
- Why does cURL return error “(23) Failed writing body”?
- Finding text inside a folder using terminal
- Superscript in Python plots
- Command not found go — on Mac after installing Go
- IPython, “name ‘plt’ not defined”
- What is the meaning of “int(a[::-1])” in Python?
- gdb debugging in Terminal OS X (10.8.5) with zsh
- Updating php version on mac
- How to completely uninstall python 2.7.13 on Ubuntu 16.04
- Spell Checker for Python
- Failed to launch macOS app built in Xcode
- Testing web application on Mac/Safari when I don’t own a Mac
- How to completely uninstall Android Studio on Mac?
- In python, how can I print lines that do NOT contain a certain string, rather than print lines which DO contain a certain string:
- input() error – NameError: name ‘…’ is not defined
- Is there an equivalent of lsusb for OS X
- TypeError: zip argument #2 must support iteration
- Open Sublime Text from Terminal in macOS
- numpy/scipy/ipython:Failed to interpret file as a pickle