JuliaPy / JuliaPy/PyPlot.jl

Cannot use Both ProfileView and PyPlot

Ouverte
#388 0 commentaires 0 réactions 0 personnes assignées Voir sur GitHub
Langage dominant
Julia
Étoiles
488
Forks
90
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

When I start `ProfileView` first and then `PyPlot` using the `:qt` backend as suggested [here](https://github.com/JuliaPy/PyPlot.jl/issues/104), I get the following error:

```
ERROR: InitError: PyError (PyImport_ImportModule

The Python package matplotlib.pyplot could not be found by pyimport. Usually this means
that you did not install matplotlib.pyplot in the Python version being used by PyCall.

PyCall is currently configured to use the Julia-specific Python distribution
installed by the Conda.jl package. To install the matplotlib.pyplot module, you can
use `pyimport_conda("matplotlib.pyplot", PKG)`, where PKG is the Anaconda
package the contains the module matplotlib.pyplot, or alternatively you can use the
Conda package directly (via `using Conda` followed by `Conda.add` etcetera).

Alternatively, if you want to use a different Python distribution on your
system, such as a system-wide Python (as opposed to the Julia-specific Python),
you can re-configure PyCall with that Python. As explained in the PyCall
documentation, set ENV["PYTHON"] to the path/name of the python executable
you want to use, run Pkg.build("PyCall"), and re-launch Julia.

)
ImportError("/lib64/libz.so.1: version `ZLIB_1.2.9' not found (required by /home/.julia/packages/Conda/m7vem/deps/usr/lib/python3.7/site-packages/matplotlib/../../../libpng16.so.16)")
File "/home/.julia/packages/Conda/m7vem/deps/usr/lib/python3.7/site-packages/matplotlib/pyplot.py", line 31, in
import matplotlib.colorbar
File "/home/.julia/packages/Conda/m7vem/deps/usr/lib/python3.7/site-packages/matplotlib/colorbar.py", line 36, in
import matplotlib.contour as contour
File "/home/.julia/packages/Conda/m7vem/deps/usr/lib/python3.7/site-packages/matplotlib/contour.py", line 21, in
import matplotlib.text as text
File "/home/.julia/packages/Conda/m7vem/deps/usr/lib/python3.7/site-packages/matplotlib/text.py", line 22, in
from .textpath import TextPath # Unused, but imported by others.
File "/home/.julia/packages/Conda/m7vem/deps/usr/lib/python3.7/site-packages/matplotlib/textpath.py", line 20, in
from matplotlib.mathtext import MathTextParser
File "/home/.julia/packages/Conda/m7vem/deps/usr/lib/python3.7/site-packages/matplotlib/mathtext.py", line 38, in
from matplotlib import _png, colors as mcolors, get_data_path, rcParams

Stacktrace:
[1] pyimport(::String) at /home/.julia/packages/PyCall/rUul9/src/PyCall.jl:486
[2] __init__() at /home/.julia/packages/PyPlot/fZuOQ/src/init.jl:187
[3] _include_from_serialized(::String, ::Array{Any,1}) at ./loading.jl:627
[4] macro expansion at ./logging.jl:312 [inlined]
[5] _require_search_from_serialized(::Base.PkgId, ::String) at ./loading.jl:698
[6] _require(::Base.PkgId) at ./loading.jl:931
[7] require(::Base.PkgId) at ./loading.jl:852
[8] macro expansion at ./logging.jl:311 [inlined]
[9] require(::Module, ::Symbol) at ./loading.jl:834
during initialization of module PyPlot
```

When I haven't used `ProfileView` first, I don't get similar issues. Also, if I load `PyPlot` first, `ProfileView` hangs when I try to use it.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.