cannot import name 'mlab' from 'mayavi'怎么解决
python3吧
全部回复
仅看楼主
level 1
为什么from mayavi import mlab没有用
明明mayavi安装正常,我是用pip安装的,几个组件也都安装了。
2019年05月10日 14点05分 1
level 1
同问,用的3.7.0Python,Mayavi 4.6.2,运行导入命令时候,出现:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\3Dsimulation\AppData\Local\Programs\Python\Python37\lib\site-packages\mayavi\mlab.py", line 15, in <module>
from mayavi.core.common import process_ui_events
File "C:\Users\3Dsimulation\AppData\Local\Programs\Python\Python37\lib\site-packages\mayavi\core\common.py", line 16, in <module>
from apptools.persistence.state_pickler import create_instance
File "C:\Users\3Dsimulation\AppData\Local\Programs\Python\Python37\lib\site-packages\apptools\persistence\state_pickler.py", line 1210
2019年05月28日 16点05分 3
level 1
I experienced the same problem but solved it. seems in the state_pickler.py file, in a few places (where the error message tells, it has \ in in the "if .... \ and " (used to split the and conditions in multiple lines), just to remove the \ to make all the " and " conditions in one line. There are a few places with the issue, then amazingly it work!
from stackoverflow @贴吧用户_0000582
2019年08月12日 02点08分 4
没看懂
2019年09月19日 04点09分
@贴吧用户_QAC8bPP 你懂了没
2019年11月25日 09点11分
谢谢,已经解决了
2019年12月09日 08点12分
Thank you! [大拇指]
2020年04月10日 06点04分
level 1
你看看是不是文件名写的不好,我就是把文件名写成了mayavi结果就导入不了,改了名就好了
2020年03月25日 13点03分 5
我跟你一样的问题
2022年08月14日 07点08分
1