Anaconda常用下载命令:
先自己设定好虚拟环境:base,tensorflowGPU,pytorch
TensorFlow:
activate tensorflowGPU
sklearn: pip install —ignore-installed sklearn -i https://pypi.tuna.tsinghua.edu.cn/simple
keras: pip install keras==2.1.4 -i http://pypi.douban.com/simple --trusted-host pypi.douban.com
Pytorch:
创建环境、激活环境与退出环境
conda create -n pytorch python=3.8
activate pytorch
conda deactivate
根据自己的版本,先用迅雷下载到本地D:\深度学习python环境搭建\:torch-1.6.0,torchvision-0.7.0
安装:
pip install D:\深度学习python环境搭建\torch-1.6.0+cu101-cp36-cp36m-win_amd64.whl -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install D:\深度学习python环境搭建\torchvision-0.7.0-cp36-cp36m-win_amd64.whl -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install torch-scope -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install torch===1.6.0 torchvision===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html
在pycharm设置里面的Project Interpreter中要根据代码引用的包切换TensorFlow与Pytorch。
在命令行输入ipython,退出用exit ()。但进行计算需要提前导入包。
安装gym
pip gym
安装atari(三个缺一不可)
pip install gym[atari]
pip uninstall atari_py
pip install --no-index -f https://github.com/Kojoley/atari-py/releases atari_py