python - 在 Matlab 中使用 Python 和 NumPy
问题描述
我目前尝试在 Matlab 中调用 Python 函数。一切正常,直到我尝试在我的 Python 函数中使用任何标准库。在我的情况下,它的 NumPy 应该被使用。而不是输出,Matlab 给了我错误:
使用 _distributor_init> 时出错(第 34 行) Python 错误:ImportError:DLL 加载失败:找不到模块。
_distributor_init.py 是 NumPy 的一部分,第 33/34 行是:
with RTLD_for_MKL():
from . import _mklinit
有谁知道如何将 Python 与 NumPy 连接到 Matlab?
解决方案
运行pyversion
并确保它指向适当的 anaconda 环境 bin。显然,numpy 安装在那个 python 环境中。
推荐阅读
- python - 为什么 python 以东方字符写入我的 CSV 文件?
- javascript - 在 React 中使用箭头函数的 SetInterval 和回调
- ios - 无法将类型“[ViewController.MyStruct]”的值分配给类型“[ViewController.MyOtherStruct]”
- ios - React Native FBSDK Login - 使用应用程序登录失败
- google-sheets - 如何在 Google 表格中可视化依赖关系图(产品路线图)
- apache-tomee - 将 TomEE Plus 7.1.0 与 MyEclipse CI 2018 集成
- r - 保存 XLS 文件格式错误:自动转换为数字
- ruby-on-rails - 控制器 I18n 编码
- c# - IIS 工作进程和工作线程
- mysql - 来自外部服务器的 Google Cloud SQL 超时