Closed gideonsimpson closed 6 years ago
What are the versions of the packages you are using? You can show us the output of:
using Pkg
Pkg.status(Pkg.PKGMODE_MANIFEST) # or "]st"
using Conda
Conda.list()
Did you make sure that it worked in Python? You can check it by:
using PyCall
run(`$(PyCall.pyprogramname) -c "from matplotlib import pyplot; pyplot.plot([1, 2, 3]); pyplot.show()"`)
I think there are the relevant packages:
[8f4d0f93] Conda v1.0.2
[91a5bcdd] Plots v0.20.4
[d330b81b] PyPlot v2.6.3
and
conda 4.5.11 py37_0
conda-env 2.6.0 1
matplotlib 3.0.0 py37h54f8f79_0
numpy 1.15.2 py37h6a91979_0
numpy-base 1.15.2 py37h8a80b8c_0
python 3.7.0 hc167b69_0
and the PyCall command returns:
Traceback (most recent call last):
File "/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/lib/python3.7/site-packages/matplotlib/font_manager.py", line 1353, in <module>
fontManager = json_load(_fmcache)
File "/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/lib/python3.7/site-packages/matplotlib/font_manager.py", line 888, in json_load
with open(filename, 'r') as fh:
FileNotFoundError: [Errno 2] No such file or directory: '/Users/guardian/.matplotlib/fontlist-v300.json'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/lib/python3.7/site-packages/matplotlib/pyplot.py", line 32, in <module>
import matplotlib.colorbar
File "/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/lib/python3.7/site-packages/matplotlib/colorbar.py", line 32, in <module>
import matplotlib.contour as contour
File "/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/lib/python3.7/site-packages/matplotlib/contour.py", line 18, in <module>
import matplotlib.font_manager as font_manager
File "/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/lib/python3.7/site-packages/matplotlib/font_manager.py", line 1363, in <module>
_rebuild()
File "/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/lib/python3.7/site-packages/matplotlib/font_manager.py", line 1344, in _rebuild
fontManager = FontManager()
File "/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/lib/python3.7/site-packages/matplotlib/font_manager.py", line 987, in __init__
self.afmlist = createFontList(afmfiles, fontext='afm')
File "/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/lib/python3.7/site-packages/matplotlib/font_manager.py", line 481, in createFontList
font = afm.AFM(fh)
File "/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/lib/python3.7/site-packages/matplotlib/afm.py", line 398, in __init__
self._composite) = _parse_afm(fh)
File "/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/lib/python3.7/site-packages/matplotlib/afm.py", line 383, in _parse_afm
_sanity_check(fh)
File "/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/lib/python3.7/site-packages/matplotlib/afm.py", line 91, in _sanity_check
line = next(fh)
StopIteration
ERROR: failed process: Process(`/Users/guardian/.julia/packages/Conda/hsaaN/deps/usr/bin/python -c 'from matplotlib import pyplot; pyplot.plot([1, 2, 3]); pyplot.show()'`, ProcessExited(1)) [1]
Stacktrace:
[1] error(::String, ::Base.Process, ::String, ::Int64, ::String) at ./error.jl:42
[2] pipeline_error at ./process.jl:705 [inlined]
[3] #run#504(::Bool, ::Function, ::Cmd) at ./process.jl:663
[4] run(::Cmd) at ./process.jl:661
[5] top-level scope at none:0
Yeah I thought it's matplotlib 3. Unless you can make the last command (it's pure Python, nothing to do with Julia or PyCall.jl) work, PyPlot.jl won't work. Something like Conda.add("matplotlib<3")
to downgrade matplotlib may help. Otherwise you need to report the bug to matplotlib and/or Anaconda.
This may be relevant: https://github.com/matplotlib/matplotlib/issues/12291
Ok, downgrading it appears to work. I have no specific need for mpl 3.0.
Good that it works.
The following issue has shown up for me. I'm using MacOS 10.13.16.