Hello,
recently I’ve installed Julia and python on my PC (Ubuntu 16.04 LTS) and tried to give it a try. Everything works good until I want to use plotting. Here is a piece of code I’d like to compile:
Pkg.add("PyPlot")
using Plots
pyplot()
plot(rand(10))
I used juliabox to check if it works and it does w/o any issues. My output for command julia exp.jl looks like this:
sys:1: UserWarning:
This call to matplotlib.use() has no effect because the backend has already
been chosen; matplotlib.use() must be called *before* pylab, matplotlib.pyplot,
or matplotlib.backends is imported for the first time.
The backend was *originally* set to u'Qt5Agg' by the following code:
File "/home/bartosz/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/matplotlib/backends/__init__.py", line 14, in <module>
line for line in traceback.format_stack()
INFO: Nothing to be done
WARNING: No working GUI backend found for matplotlib
WARNING: Couldn't initialize pyplot. (might need to install it?)
ERROR: LoadError: InitError: PyError (:PyImport_ImportModule) <type 'exceptions.ImportError'>
ImportError("/lib/x86_64-linux-gnu/libz.so.1: version `ZLIB_1.2.9' not found (required by /home/bartosz/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/matplotlib/../../.././libpng16.so.16)",)
File "/home/bartosz/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/matplotlib/pyplot.py", line 29, in <module>
import matplotlib.colorbar
File "/home/bartosz/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/matplotlib/colorbar.py", line 36, in <module>
import matplotlib.contour as contour
File "/home/bartosz/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/matplotlib/contour.py", line 21, in <module>
import matplotlib.font_manager as font_manager
File "/home/bartosz/.julia/v0.4/Conda/deps/usr/lib/python2.7/site-packages/matplotlib/font_manager.py", line 58, in <module>
from matplotlib import afm, cbook, ft2font, rcParams, get_cachedir
[inlined code] from /home/bartosz/.julia/v0.4/PyCall/src/exception.jl:81
in pyimport at /home/bartosz/.julia/v0.4/PyCall/src/PyCall.jl:392
during initialization of module PyPlot
while loading /home/bartosz/exp.jl, in expression starting on line 4
I tried to do:
- ENV[“PYTHON”]=“”
- Pkg.build(“PyCall”)
Need help cause I’m kinda new. Any help would be appreciated