Can not install PyPlot.jl
- Lenguaje dominante
- Julia
- Estrellas
- 488
- Forks
- 90
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
```
julia> import PyPlot
ERROR: InitError: PyError (PyImport_ImportModule
The Python package matplotlib could not be found by pyimport. Usually this means
that you did not install matplotlib in the Python version being used by PyCall.
PyCall is currently configured to use the Python version at:
C:/Users/chang/.julia/conda/3/python.exe
and you should use whatever mechanism you usually use (apt-get, pip, conda,
etcetera) to install the Python package containing the matplotlib module.
One alternative is to re-configure PyCall to use a different Python
version on your system: set ENV["PYTHON"] to the path/name of the python
executable you want to use, run Pkg.build("PyCall"), and re-launch Julia.
Another alternative is to configure PyCall to use a Julia-specific Python
distribution via the Conda.jl package (which installs a private Anaconda
Python distribution), which has the advantage that packages can be installed
and kept up-to-date via Julia. As explained in the PyCall documentation,
set ENV["PYTHON"]="", run Pkg.build("PyCall"), and re-launch Julia. Then,
To install the matplotlib module, you can use `pyimport_conda("matplotlib", PKG)`,
where PKG is the Anaconda package the contains the module matplotlib,
or alternatively you can use the Conda package directly (via
`using Conda` followed by `Conda.add` etcetera).
)
ModuleNotFoundError("No module named 'matplotlib'",)
Stacktrace:
[1] pyimport(::String) at C:\Users\chang\.julia\packages\PyCall\0jMpb\src\PyCall.jl:486
[2] pyimport_conda(::String, ::String, ::String) at C:\Users\chang\.julia\packages\PyCall\0jMpb\src\PyCall.jl:650
[3] pyimport_conda at C:\Users\chang\.julia\packages\PyCall\0jMpb\src\PyCall.jl:649 [inlined]
[4] __init__() at C:\Users\chang\.julia\packages\PyPlot\mQXSC\src\init.jl:174
[5] _include_from_serialized(::String, ::Array{Any,1}) at .\loading.jl:630
[6] macro expansion at .\logging.jl:312 [inlined]
[7] _require_search_from_serialized(::Base.PkgId, ::String) at .\loading.jl:701
[8] _require(::Base.PkgId) at .\loading.jl:934
[9] require(::Base.PkgId) at .\loading.jl:855
[10] macro expansion at .\logging.jl:311 [inlined]
[11] require(::Module, ::Symbol) at .\loading.jl:837
during initialization of module PyPlot
```
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
Línea de trabajo
Start with PyPlot.jl's src/init.jl at the reported line 174, then inspect the PyCall stack at src/PyCall.jl lines 486 and 649. Reproduce the import using the reported Python path and determine whether the installation path or matplotlib discovery is responsible; done means importing PyPlot succeeds with matplotlib available.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- matplotlib, python
- Área
- data-visualization
- Tipo de issue
- Error
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Estado de actividad
- Estancado
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 25/100