python - Windows 10 上的 Julia 1.0.0 来自“使用 PyPlot”的错误:“pyimport 找不到 Python 包 matplotlib。”
问题描述
刚刚从 julialang.org 安装了 Julia 1.0.0
做了以下事情:
using Pkg
Pkg.add("PyPlot") 使用 PyPlot
. . . 收到此错误:pyimport 找不到 Python 包 matplotlib。通常这意味着您没有在 PyCall 使用的 Python 版本中安装 matplotlib。
我已经安装了蟒蛇。
这是完整的 JULIA 1.0.0 日志………………</p>
_
_ _ _(_)_ | Documentation: https://docs.julialang.org
(_) | (_) (_) |
_ _ _| |_ __ _ | Type "?" for help, "]?" for Pkg help.
| | | | | | |/ _` | |
| | |_| | | | (_| | | Version 1.0.0 (2018-08-08)
_/ |\__'_|_|_|\__'_| | Official https://julialang.org/ release
|__/ |
julia> using Pkg
julia> Pkg.add("PyPlot")
Updating registry at `C:\Users\douglaskbell\.julia\registries\General`
Updating git-repo `https://github.com/JuliaRegistries/General.git`
Resolving package versions...
Updating `C:\Users\douglaskbell\.julia\environments\v1.0\Project.toml`
[no changes]
Updating `C:\Users\douglaskbell\.julia\environments\v1.0\Manifest.toml`
[no changes]
julia> using PyPlot
[ Info: Installing matplotlib via the Conda matplotlib package...
[ Info: Running `conda install -y matplotlib` in root environment
Solving environment: done
# All requested packages already installed.
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.
解决方案
这有帮助(设置 anaconda python 二进制文件的正确路径)吗?
ENV["PYTHON"] = "c:\\full\\path\\to\\anaconda\\bin\\python"
using Pkg
Pkg.build("PyCall")
using PyPlot
推荐阅读
- python - 从命令行运行的multipledispatch ModuleNotFoundError
- javascript - 滑块中的按钮无法使用 javascript
- vim - 如何在vim中根据条件自动完成?
- http - Google Cloud App Engine 为第一个请求提供无法获取 /
- css - 使滑出到图标 img
- c++ - 在 Qt C++ 中形成父窗口后 n 秒后打开子窗口
- android - Android 应用程序包上传创建奇怪的帐户(
.<5 位数字>@gmail.com) 在 Firebase 身份验证中 - python - 加载 xgboost 模型返回 NoneType
- ios - 视频流未在 iphone 应用上显示视图
- android - 请求增量注释处理