pip 源设置

方式 1:
# 直接修改源配置
pip config set global.index-url https://mirrors.aliyun.com/pypi/simple/

方式 2:
# 临时指定源地址
pip install opencv-python -i https://pypi.tuna.tsinghua.edu.cn/simple/

常用源:
阿里云            https://mirrors.aliyun.com/pypi/simple/
豆瓣(douban)      https://pypi.douban.com/simple/
清华大学          https://pypi.tuna.tsinghua.edu.cn/simple/

pip 升级

# pip 升级到最新版
python -m pip install --upgrade pip

安装 OpenGL :

# pip install PyOpenGL

安装 OpenCV :

# pip install opencv-python

安装 pygame ( Python 3.5 x64 ):

下载 wheel 文件: 

https://files.pythonhosted.org/packages/0b/8c/109e25163da7144c0767b33d41d4674c4aa8cb88d18aa29fc02341f3981a/pygame-1.9.3-cp35-cp35m-win_amd64.whl

# pip install D:\Python\pygame-1.9.3-cp35-cp35m-win_amd64.whl

安装 dlib ( 1.8 ) :

下载 wheel 文件:

https://files.pythonhosted.org/packages/30/91/ffef19ef1dcbe36fa1fd3d1e01e7cf8177a9edd1a13f51877f8f4623c132/dlib-18.17.100-cp35-none-win_amd64.whl

# pip install D:\Python\dlib-18.17.100-cp35-none-win_amd64.whl

安装 TensorFlow ( 1.8.0 ) :

注意: 使用 Python 3.6 

下载 wheel 文件:

https://raw.githubusercontent.com/fo40225/tensorflow-windows-wheel/master/1.8.0/py36/CPU/sse2/tensorflow-1.8.0-cp36-cp36m-win_amd64.whl

# pip install D:\Python\tensorflow-1.8.0-cp36-cp36m-win_amd64.whl

安装 matplotlib (数学用, 图形展示工具):

# pip install matplotlib 

如果报错: module 'matplotlib' has no attribute 'verbose' 就使用: 

# pip install matplotlib==2.1.0

安装 pandas (操作 CSV, Excel 等):

# pip install pandas

安装 pillow ( Python 图片操作工具包 PIL ) :

# pip install pillow   

安装 openslide ( Python 操作读取大图像工具包, 几百M, 或者上G ):

# pip install openslide-python

安装 QT ( Python 图形界面 ):

# pip install PyQt5

Logo

CSDN联合极客时间,共同打造面向开发者的精品内容学习社区,助力成长!

更多推荐