Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pyplot crashed Julia #441

Closed
liuyoufang opened this issue May 12, 2019 · 10 comments
Closed

Pyplot crashed Julia #441

liuyoufang opened this issue May 12, 2019 · 10 comments

Comments

@liuyoufang
Copy link

Hi All,,

I installed the new version of Julia and decided to see all the ruction is working or not.

But I got an error message:

julia> using PyPlot, SeisProcessing
julia> subplot(131)
2019-05-12 13:47:02.245 julia[656:42779] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7fb32d81bd40
2019-05-12 13:47:02.245 julia[656:42779] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7fb32d81bd40'
*** First throw call stack:
(
)
libc++abi.dylib: terminating with uncaught exception of type NSException

signal (6): Abort trap: 6
in expression starting at no file:0
__pthread_kill at /usr/lib/system/libsystem_kernel.dylib (unknown line)
Allocations: 24100174 (Pool: 24095463; Big: 4711); GC: 50

I searched for a few solutions and tried to change the backend to TK. It does not work. And then I tried qt but it seems like the current Python I have does not have this Function.
Anyone would shine some lights on it??

Cheers

@stevengj
Copy link
Member

stevengj commented May 12, 2019

This is #410 — tkagg is broken (upstream bug) on MacOS, and you need to use a non-tk backend.

Are you using the Conda Python? (What is PyPlot.PyCall.python?) Conda can automatically install the qt backend for you.

@liuyoufang
Copy link
Author

Hi Stevengj,

I am not using Conda Python.

OS X

On MacOS, you should either install XQuartz for MacOS 10.9 or later or install the Anaconda Python distribution in order to get a fully functional PyPlot.

MacOS 10.9 comes with Python and Matplotlib, but this version of Matplotlib defaults to with the Cocoa GUI backend, which is not supported by PyPlot. It also has a Tk backend, which is supported, but the Tk backend does not work unless you install XQuartz.

Alternatively, you can install the Anaconda Python distribution (which also includes ipython and other IJulia dependencies).

I think you are talking two methods that was mentioned above: either using Conda Python or using install XQUARTZ. I have installed XQUARTZ before so I do not use condo Python. But somehow it is still not working for me.

Thanks,

@liuyoufang
Copy link
Author

This is #410 — tkagg is broken (upstream bug) on MacOS, and you need to use a non-tk backend.

Are you using the Conda Python? (What is PyPlot.PyCall.python?) Conda can automatically install the qt backend for you.

I am not using Conda Python.

OS X

On MacOS, you should either install XQuartz for MacOS 10.9 or later or install the Anaconda Python distribution in order to get a fully functional PyPlot.

MacOS 10.9 comes with Python and Matplotlib, but this version of Matplotlib defaults to with the Cocoa GUI backend, which is not supported by PyPlot. It also has a Tk backend, which is supported, but the Tk backend does not work unless you install XQuartz.

Alternatively, you can install the Anaconda Python distribution (which also includes ipython and other IJulia dependencies).

I think you are talking two methods that was mentioned above: either using Conda Python or using install XQUARTZ. I have installed XQUARTZ before so I do not use condo Python. But somehow it is still not working for me.

Thanks

@liuyoufang
Copy link
Author

@stevengj I tried to change the backend in the matplotlibrc file from Agg to TkAgg....still not working

@liuyoufang
Copy link
Author

@stevengj this is the value for the PyPlot.PyCall.python: "/Users/youfangliu/.julia/conda/3/bin/python"

@liuyoufang
Copy link
Author

@stevengj Problem is solved for now. I have to manually install PyQt4 and change the backend to qt5agg in the matplotlibrc file at the location of .julia/conda/3/lib/python3.7/site-packages/matplotlib/mpl-data

@stevengj
Copy link
Member

Was the backend manually set to tkagg before?

PyPlot should pick the qt backend by default if pyqt is installed. And if you are using the Conda Python (which you are, according to PyPlot.PyCall.python), then it should automatically install pyqt for you if that is set as the backend.

@liuyoufang
Copy link
Author

@stevengj Nope, it was set up as egg instead of tkagg. The strange thing about it is that I used the installation that recommended by Julia to install the PyPlot, but it seems like it does not get the PyQt in correctly.

@stevengj
Copy link
Member

Do you have a different backend specified in your matplotlibrc?

@liuyoufang
Copy link
Author

liuyoufang commented May 30, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants