Problems
- runtime error.
Runtime Error R6034 Program; C:\Users\c\AppData\Local\Julia-0.6.0\bin\julia.exe R6034 An application has made an attempt to load the C runtime library incorrectly. Please contact the application's support team for more information.```
Qt
errorThe application failed to start because it could not find or load the QT platform plugin "windows" in "", Available platform plugins are: minimal, offscreen, windows
Solution 1
- do not use
pyplot()
, useGR()
using Plots GR() histogram(randn(10000))
Solution 2
do the following instruction step by step.
- re-install
matplotlib
conda uninstall matplotlib pip install -U matplotlib
- test your matplotlib will work in python.
import matplotlib.plot as plt import numpy as np x = np.linspace(0,2*pi,1000); y = np.sin(3*x + 4*np.cos(2*x)); plt.plot(x, y, color="red", linewidth=2.0, linestyle="--") plt.show()
- config your python path, then rebuild the
PyCall
module.using Pkg ENV["PYTHON"]="D://miniconda//python.exe" # "path to your python" Pkg.build("PyCall")
- verify you can use
PyCall
to callMatplotlib
in julia.
using Pycall
@pyimport numpy as np
@pyimport matplotlib.pyplot as plt
x = np.linspace(0,2*pi,1000); y = np.sin(3*x + 4*np.cos(2*x));
plt.plot(x, y, color="red", linewidth=2.0, linestyle="--")
plt.show()
- reinstall
Plots
andPyPlot
.using Pkg Pkg.rm("Plots") Plt.rm("PyPlot") Pkg.add("Plots") Pkg.add("PyPlot")
- finally check that you can see the
gui
.using PyPlot # use x = linspace(0,2*pi,1000) in Julia 0.6 x = range(0; stop=2*pi, length=1000); y = sin.(3 * x + 4 * cos.(2 * x)); plot(x, y, color="red", linewidth=2.0, linestyle="--") title("A sinusoidally modulated sinusoid")