使用的python 3.9.13。
折腾了一上午,还是报错,下午又2个小时,终于可以运行了。
利用pycharm下载太慢,大的文件直接网上下载的文件,小的pip安装或者自动下载安装。
1.PyQt5:
PyQt5-5.15.3-cp36.cp37.cp38.cp39-none-win_amd64.whl
下载网址:https://pypi.tuna.tsinghua.edu.cn/simple/pyqt5/
安装:pip install E:\py\PyQt5-5.15.3-cp36.cp37.cp38.cp39-none-win_amd64.whl
PyQt5_Qt-5.15.2-py3-none-win_amd64.whl
下载网址:https://pypi.tuna.tsinghua.edu.cn/simple/pyqt5-qt5/
2.traits 和traitsui
使用的 pip install traits 和 pip install traitsui自动下载安装
查看版本 traits 7.0.2 traitsui 8.0.0
3.vtk vtk-9.1.0-cp39-cp39-win_amd64.whl
https://pypi.tuna.tsinghua.edu.cn/simple/vtk/
安装时还自动下载安装了很多库
4.mayavi 4.7.4 使用pip指定版本4.7.4
pip install mayavi==4.7.4
5.configobj,
下载完运行代买提示没有configobj,使用pip安装。
pip install configobj
测试使用的网上找的代码:https://blog.csdn.net/xc_zhou/article/details/84033877 。
# -*- coding:utf-8 -*-
import numpy as np
from mayavi import mlab
import matplotlib.pyplot as plt
x, y = np.ogrid[-2:2:20j, -2:2:20j]
z = x * np.exp( - x**2 - y**2)
pl = mlab.surf(x, y, z, warp_scale="auto")
mlab.axes(xlabel='x', ylabel='y', zlabel='z')
mlab.outline(pl)
mlab.show()