您当前的位置: 首页 >  Python
  • 4浏览

    0关注

    477博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文

Python3.8上安装vtk和mayavi踩坑: Building wheel for mayavi (setup.py) ...

高精度计算机视觉 发布时间:2021-12-05 00:13:31 ,浏览量:4

用python3.7时,mayavi貌似很容易安装。

现在彩python3.8,发现安装时有下面的问题:

。。。。

UnicodeDecodeError: 'ascii' codec can't decode byte 0xe2 in position 45: ordinal not in range(128)   CCompilerOpt._cache_write[796] : write cache to path -> /tmp/pip-install-w8u16lpt/mayavi_956e846f839b4f7d95f69b7965bc3a4d/build/temp.linux-x86_64-3.8/ccompiler_opt_cache_ext.py   ----------------------------------------   ERROR: Failed building wheel for mayavi

上网找了一下,说是要手动指定vtk和mayavi的版本,才能在python3.8的环境下安装成功。在Python3.7的环境下安装的vtk==8.1.2。Python3.9我没有试过,不知道情况。

说下我在Python3.8上安装mayavi的情况我摘录如下,

I'm seeing a stall as well during pip install of Mayavi 4.7.3 with VTK >= 9.0.2 (macOS 10.15, Python 3.6). Might be related to #1054, where the workaround was to install VTK 8.1.2. #1057 also reports a similar hang with VTK 9.0.3 (#1057 (comment)), whereas VTK 9.0.1 works, and this PR mentions issues with VTK 9.0.2. The workaround for me was also to pip install VTK 9.0.1 and Mayavi 4.7.3.

参考链接:

https://github.com/enthought/mayavi/issues/1055

也就是说,应该用下面的版本安装,

pip install vtk==9.0.1
pip install mayavi==4.7.3

我用上面这两条指令,在PYTHON3.8上安装成功。

关注
打赏
1659856567
查看更多评论
立即登录/注册

微信扫码登录

0.0775s