查看已安装的模块
pip show tensorflow
查看已安装所有模块
pip list
安装模块
普通安装
pip install tensorflow
指定版本号安装
pip install tensorflow==1.13.1
读取txt内容安装
pip install -r requirements.txt
一般需要使用如下语句,用国内镜像加速安装
pip install -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com tensorflow
卸载已安装的模块
pip uninstall tensorflow
离线安装
先到国内镜像源中下载对应whl文件,然后利用pip安装
pip install xxxx.whl
由于tensorflow的依赖项较多,此处提供一个本人整理的tensorflow2.3.0的依赖项的下载链接,安装前请先离线安装Anaconda3,python版本最好为3.6-3.8
链接:https://pan.baidu.com/s/1bHUvMrV3_kFab2breWoaHg
提取码:nban
国内的其他镜像源
清华大学 https://pypi.tuna.tsinghua.edu.cn/simple/
阿里云 http://mirrors.aliyun.com/pypi/simple/
中国科技大学 https://pypi.mirrors.ustc.edu.cn/simple/
豆瓣(douban) http://pypi.douban.com/simple/
中国科学技术大学 http://pypi.mirrors.ustc.edu.cn/simple/