matlab plot symbol,导入时出错matlab.引擎不导入ubuntu16.04上python3.5.2中的matplotlib。为什么?...

我在ubuntu16.04上使用python(3.5.2)中的matlab.engine(matlabr2016b),

遵循官方指示"MATLAB API for Python"。

面对这个奇怪的问题,我很困惑。

当我在导入matplotlib之后导入matlab.engine时,它工作得很好:import matplotlib

import matlab.engine

eng = matlab.engine.start_matlab()

#...

但是,如果没有首先导入matplotlib,则在jupyter笔记本中会出现如下错误:

^{pr2}$

同样,在从终端运行.py文件时也会出现类似的错误消息:Traceback (most recent call last):

File "/home/andy/workspace/python/vp3.5_64/lib/python3.5/site-packages

/matlab/engine/__init__.py", line 42, in

pythonengine = importlib.import_module("matlabengineforpython"+_PYTHONVERSION)

File "/home/andy/workspace/python/vp3.5_64/lib/python3.5/importlib

/__init__.py", line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "", line 986, in _gcd_import

File "", line 969, in _find_and_load

File "", line 956, in

_find_and_load_unlocked

ImportError: No module named 'matlabengineforpython3_5'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "/home/andy/workspace/python/vp3.5_64/lib/python3.5/site-packages

/matlab/engine/__init__.py", line 58, in

pythonengine =

importlib.import_module("matlabengineforpython"+_PYTHONVERSION)

File "/home/andy/workspace/python/vp3.5_64/lib/python3.5/importlib

/__init__.py", line 126, in import_module

return _bootstrap._gcd_import(name[level:], package, level)

File "", line 986, in _gcd_import

File "", line 969, in _find_and_load

File "", line 958, in _find_and_load_unlocked

File "", line 666, in _load_unlocked

File "", line 577, in module_from_spec

File "", line 906, in

create_module

File "", line 222, in

_call_with_frames_removed

ImportError: /home/andy/Matlab/R2016b/extern/engines/python/dist/matlab

/engine/glnxa64/../../../../../../../bin/glnxa64/libssl.so.1.0.0:

undefined symbol: EVP_idea_cbc

During handling of the above exception, another exception occurred:

Traceback (most recent call last):

File "test2.py", line 4, in

from community_detectors import *

File "/home/andy/workspace/paper0/community_detectors.py", line 11, in

from cd_elm import cd_elm

File "/home/andy/workspace/paper0/cd_elm.py", line 6, in

import matlab.engine

File "/home/andy/workspace/python/vp3.5_64/lib/python3.5/site-packages

/matlab/engine/__init__.py", line 61, in

'MathWorks Technical Support for assistance: %s' % e)

OSError: Please reinstall MATLAB Engine for Python or contact MathWorks

Technical Support for assistance: /home/andy/Matlab/R2016b/extern/engines

/python/dist/matlab/engine/glnxa64/../../../../../../../bin/glnxa64

/libssl.so.1.0.0: undefined symbol: EVP_idea_cbc

为什么?

导入matplotlib似乎包含了丢失的名为'matlabengineforpython3_5'的模块?是真的吗?

matplotlib和{}之间的关系是什么?

有没有更好的办法来解决这个进口问题?

谢谢:)