下载whl格式的模块,进入模块的目录,比如我的模块下载在D:\Pythonwork
1.进入模块所在目录
D:
cd D:\Pythonwork
2.安装模块pip install XXX.whl
D:\Pythonwork>pip install pygame-2.1.2-cp37-cp37m-win_amd64.whl
Processing d:\pythonwork\pygame-2.1.2-cp37-cp37m-win_amd64.whl
Installing collected packages: pygame
Successfully installed pygame-2.1.2
要注意python版本与模块的版本对应关系,比如我的python是3.7,windows系统,64位,那么pygame是cp37,win_amd64
查看python版本命令。否则可能提示.whl is not a supported wheel on this platform.
D:\Pythonwork>python
Python 3.7.0 (v3.7.0:1bf9cc5093, Jun 27 2018, 04:59:51) [MSC v.1914 64 bit (AMD64)] on win32