JuliaPy / PyPlot.jl

Plotting for Julia based on matplotlib.pyplot
https://github.com/JuliaPy/PyPlot.jl
MIT License
475 stars 87 forks source link

Cannot plot NSException #433

Closed rveltz closed 5 years ago

rveltz commented 5 years ago

Hi,

I removed anaconda from my computer and try to have a clean install. However I am still unable to plot...

Am y doing something wrong?

Thank you,

Bests

julia
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.1.0 (2019-01-21)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> ENV["PYTHON"]=""
""

(v1.1) pkg> add PyCall PyPlot
  Updating registry at `~/.julia/registries/General`
  Updating git-repo `https://github.com/JuliaRegistries/General.git`
 Resolving package versions...
  Updating `~/.julia/environments/v1.1/Project.toml`
  [438e738f] + PyCall v1.91.1
  [d330b81b] + PyPlot v2.8.0
  Updating `~/.julia/environments/v1.1/Manifest.toml`
  [438e738f] + PyCall v1.91.1
  [d330b81b] + PyPlot v2.8.0

julia> using PyPlot

julia> plot(rand(10))
2019-04-05 16:04:59.861 julia[6702:464135] -[NSApplication _setup:]: unrecognized selector sent to instance 0x7ff4d89a8100
2019-04-05 16:04:59.862 julia[6702:464135] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[NSApplication _setup:]: unrecognized selector sent to instance 0x7ff4d89a8100'
*** 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: 20963753 (Pool: 20960122; Big: 3631); GC: 46
Abort trap: 6
stevengj commented 5 years ago

What are PyPlot.backend and PyPlot.PyCall.python?

rveltz commented 5 years ago

"tkagg" and "/Users/rveltz/.julia/conda/3/bin/python"

stevengj commented 5 years ago

This is #410 — the tkagg backend is broken (in Python as well) on macos, apparently due to a tkinter bug. Workaround is to use the qt5 backend.

stevengj commented 5 years ago

In PyPlot master (6bd7b680e5db828b427cff66196d61deaa6cee7b), it is changed to no longer try tk first.