Comments (6)
For completeness, you can also create this file, to avoid a code change (which may or may not be preferable):
$ mkdir -p ~/.matplotlib
$ echo "backend: TkAgg" > ~/.matplotlib/matplotlibrc
from sms-tools.
@xserra I don't think this is solved. I'm still running into this issue with matplotlib
v3.0.2 installed into a miniconda environment on macOS:
conda list matplotlib
# packages in environment at /usr/local/miniconda3/envs/te:
#
# Name Version Build Channel
matplotlib 3.0.2 py36_1001 conda-forge
matplotlib-base 3.0.2 py36hf043ca5_1001 conda-forge
Attempting
from matplotlib import pyplot as plt
plt.plot(range(10))
throws the following exception
python[35172:6260598] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fccc5e0a500'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff2f3c9ecd __exceptionPreprocess + 256
1 libobjc.A.dylib 0x00007fff5b481720 objc_exception_throw + 48
2 CoreFoundation 0x00007fff2f447275 -[NSObject(NSObject) __retain_OA] + 0
3 CoreFoundation 0x00007fff2f36bb40 ___forwarding___ + 1486
4 CoreFoundation 0x00007fff2f36b4e8 _CF_forwarding_prep_0 + 120
5 libtk8.6.dylib 0x0000000121d0b134 TkpInit + 324
6 libtk8.6.dylib 0x0000000121c630ce Initialize + 2622
7 _tkinter.cpython-36m-darwin.so 0x0000000121a8ca46 _tkinter_create + 1174
...
If I instead run the following, everything works fine.
import matplotlib
matplotlib.use("TkAgg")
from matplotlib import pyplot as plt
plt.plot(range(10))
plt.show()
from sms-tools.
...Same here and same Stackoverflow source. I had to insert the following lines:
from sys import platform as sys_pf
if sys_pf == 'darwin':
import matplotlib
matplotlib.use("TkAgg")
at the top of the file
sms-tools/software/models_interface/models_GUI.py
to get rid of the crash.
from sms-tools.
Why is the solution to this to use TkAgg
instead of macosx
for the backend?
from sms-tools.
nice. that works. Suggest a pull request would be a great idea.
The specific error this fixed for me was:
$ python models_GUI.py
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fedcb3a0830'
from sms-tools.
Solved, so closing.
from sms-tools.
Related Issues (20)
- module 'utilFunctions_C' has no attribute 'twm' HOT 3
- Sms
- HPS Morph transformation error HOT 1
- some button labels invisible in osx
- Sjd
- problem with cutilFunctions.pyx
- SMS
- Why the STFT calculated by SMS tool and Librosa is different? HOT 1
- Ubuntu installation instructions seem to not be working HOT 2
- Inconsistent use of tabs and spaces
- models_GUI.py and models_transformations_GUI.py don't run in python3 HOT 2
- Python 3.9 changes for compatibility and to remove exceptions. HOT 2
- Bad indices in stochastic and hpsmorph transformations HOT 1
- A4Part3 instruction exercice should be fixed
- NameError: name 'filedialog' is not defined HOT 1
- module 'numpy' has no attribute 'float' HOT 2
- Transformations_GUI issues on Python 3.11.1 (and 3.9.6) HOT 1
- utilsFunctions c function not compiling correctly on MacOSX? HOT 1
- ValueError: operands could not be broadcast together with shapes (100,) (0,)
- Transformation-GUI - HPS Morph
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sms-tools.