1.安装:
conda install PACKAGE
或者
pip install PACKAGE
2.查看已安装的包:
conda list [PACKAGE]
3.卸载包:
conda uninstall PACKAGE
4.更新包:
conda update PACKAGE
5.进出环境:
conda activate
conda deactivate
6.创建一个环境:
conda create -n xxx python=xx
7.删除一个环境:
conda remove -n xxx --all
8.列出所有环境:
conda env list
9.可以在激活环境下输入【python】,确定自己安装的python版本;确定好后,输入【exit()】退出当前查询
10.在import tensorflow之后查询tensorflow版本:
tf.__version__
11.在使用pip安装的时候,速度过慢时:(注意conda install是从不一样的下载源下载,有时会没有,所以尽量用pip!)
pip install tensorflow==1.14.0-i https://pypi.tuna.tsinghua.edu.cn/simple
如果报如下错:
ERROR: Cannot unpack file C:\Users\ADMINI~1\AppData\Local\Temp\pip-unpack-w3akr66x\simple (downloaded from C:\Users\ADMINI~1\AppData\Local\Temp\pip-req-build-_9yuf086, content-type: text/html; charset=utf-8); cannot detect archive format
ERROR: Cannot determine archive format of C:\Users\ADMINI~1\AppData\Local\Temp\pip-req-build-_9yuf086
请换以下命令:
pip install -i https://pypi.tuna.tsinghua.edu.cn/simple --trusted-host pypi.tuna.tsinghua.edu.cn pymysql
12.更加建议使用在C:/user/administrator目录下创建一个名为“pip”的文件夹,在其中创建一个pip.ini的文件,写入:
[global]
index-url = https://pypi.tuna.tsinghua.edu.cn/simple
即可以后pip安装永远是采用镜像源加速。