Cannot use Both ProfileView and PyPlot
- 主要语言
- Julia
- 星标
- 488
- 派生
- 90
- PR 合并指标
- 30 天内没有已合并 PR
描述
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.
贡献指南
这个仓库没有索引到贡献指南
调研方向
使用 :qt 后端重现 ProfileView 和 PyPlot 的两种加载顺序,然后检查第 187 行的 PyPlot/src/init.jl 以及 PyCall.jl:486 处的 PyCall 失败。完成的标准是:PyPlot 在 ProfileView 之后加载时不会出现 matplotlib 导入错误,并且 ProfileView 在 PyPlot 之后加载时不会挂起。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- julia, matplotlib, python
- 领域
- data-visualization
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100