在代码上有import pylab,可是运行失败。
运动结果 出现 报错了,ModuleNotFoundError: No module named 'pylab'
PS C:\Users\a-xiaobodou > pip install pylab
ERROR: Could not find a version that satisfies the requirement pylab (from versions: none)
ERROR: No matching distribution found for pylab
从百度搜索资料
PS C:\Users\a-xiaobodou > pip install matplotlib
Collecting matplotlib
Downloading matplotlib-3.8.2-cp311-cp311-win_amd64.whl.metadata (5.9 kB)
Collecting contourpy>=1.0.1 (from matplotlib)
Downloading contourpy-1.2.0-cp311-cp311-win_amd64.whl.metadata (5.8 kB)
Collecting cycler>=0.10 (from matplotlib)
Downloading cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools>=4.22.0 (from matplotlib)
Downloading fonttools-4.47.2-cp311-cp311-win_amd64.whl.metadata (160 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 160.8/160.8 kB 804.9 kB/s eta 0:00:00
Collecting kiwisolver>=1.3.1 (from matplotlib)
Downloading kiwisolver-1.4.5-cp311-cp311-win_amd64.whl.metadata (6.5 kB)
Requirement already satisfied: numpy<2,>=1.21 in c:\users\a-xiaobodou\appdata\local\programs\python\python311\lib\site-packages (from matplotlib) (1.26.2)
Requirement already satisfied: packaging>=20.0 in c:\users\a-xiaobodou\appdata\local\programs\python\python311\lib\site-packages (from matplotlib) (23.1)
Requirement already satisfied: pillow>=8 in c:\users\a-xiaobodou\appdata\local\programs\python\python311\lib\site-packages (from matplotlib) (10.0.0)
Collecting pyparsing>=2.3.1 (from matplotlib)
Downloading pyparsing-3.1.1-py3-none-any.whl.metadata (5.1 kB)
Collecting python-dateutil>=2.7 (from matplotlib)
Downloading python_dateutil-2.8.2-py2.py3-none-any.whl (247 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 247.7/247.7 kB 2.2 MB/s eta 0:00:00
Collecting six>=1.5 (from python-dateutil>=2.7->matplotlib)
Downloading six-1.16.0-py2.py3-none-any.whl (11 kB)
Downloading matplotlib-3.8.2-cp311-cp311-win_amd64.whl (7.6 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.6/7.6 MB 12.9 MB/s eta 0:00:00
Downloading contourpy-1.2.0-cp311-cp311-win_amd64.whl (187 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 187.6/187.6 kB 11.1 MB/s eta 0:00:00
Downloading cycler-0.12.1-py3-none-any.whl (8.3 kB)
Downloading fonttools-4.47.2-cp311-cp311-win_amd64.whl (2.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.2/2.2 MB 17.3 MB/s eta 0:00:00
Downloading kiwisolver-1.4.5-cp311-cp311-win_amd64.whl (56 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 56.1/56.1 kB 3.1 MB/s eta 0:00:00
Downloading pyparsing-3.1.1-py3-none-any.whl (103 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 103.1/103.1 kB 5.8 MB/s eta 0:00:00
Installing collected packages: six, pyparsing, kiwisolver, fonttools, cycler, contourpy, python-dateutil, matplotlib
Successfully installed contourpy-1.2.0 cycler-0.12.1 fonttools-4.47.2 kiwisolver-1.4.5 matplotlib-3.8.2 pyparsing-3.1.1 python-dateutil-2.8.2 six-1.16.0