我在matlab中使用python,我正在尝试导入numpy,但我不能
首先,我在康达创建了一个环境:
conda create -n matlab python=3.7 numpy
然后在matlab提示符下设置:
pyversion('C:\Users\Familia\.conda\envs\matlab\python.exe')
>> pyenv
ans =
PythonEnvironment with properties:
Version: "3.7"
Executable: "C:\Users\Familia\.conda\envs\matlab\python.exe"
Library: "C:\Users\Familia\.conda\envs\matlab\python37.dll"
Home: "C:\Users\Familia\.conda\envs\matlab"
Status: NotLoaded
ExecutionMode: InProcess
然后,当我试着看我是否有numpy时,我得到了以下结果:
>> help('numpy')
numpy not found.
Use the Help browser search field to search the documentation, or type "help help" for help command options, such as help for methods.
如果我尝试
py.importlib.import_module('numpy')
我明白了:
我错过了什么?
目前没有回答
相关问题 更多 >
编程相关推荐