Anaconda
1. 下载Anaconda https://www.anaconda.com/download/
2. 安装
3. 添加环境变量 Path - C:UsersGodzillaAnaconda3Scripts
4. 测试 cmd中输入 conda --version
5. 换源 https://www.jianshu.com/p/9c6b7fc4f1d9
channels: - http://mirrors.ustc.edu.cn/anaconda/cloud/menpo/ - http://mirrors.ustc.edu.cn/anaconda/cloud/bioconda/ - http://mirrors.ustc.edu.cn/anaconda/cloud/msys2/ - http://mirrors.ustc.edu.cn/anaconda/cloud/conda-forge/ - http://mirrors.ustc.edu.cn/anaconda/pkgs/main/ - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/ show_channel_urls: true
6. 运行出现问题
各种换源,还是不行,知道将https改为http,成功了(https://blog.csdn.net/u013383596/article/details/87718472)
使用anaconda navigator 创建环境(https://blog.csdn.net/weixin_38881822/article/details/89787343)
PS:更新所有包
conda update --all
pytorch
1. 下载离线安装包 https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/pytorch/win-64/
2. 在cmd中打开刚创建的环境 activate python37
3. 安装pytorch
conda install C:UsersGodzillaDownloadspytorch-cpu-0.4.1-py37_cpuhe774522_1.tar.bz2
conda install C:UsersGodzillaDownloadspytorch-cpu-1.1.0-py3.6_cpu_1.tar.bz2
conda install C:UsersGodzillaDownloads orchvision-cpu-0.3.0-py36_cuNone_1.tar.bz2
pip install torchvision
或者
conda install pytorch-cpu torchvision-cpu -c pytorch
pycharm
1. 下载 http://www.jetbrains.com/pycharm/
2. 安装
pycharm配置
打开pycharm,打开setting,Project Interpreter
添加刚创建的环境python37
然后就报错
查了一下,是因为numpy的问题,安装numpy即可
conda install numpy
最后项目所需的环境
numpy、scipy、tqdm、imageio可以直接
conda install numpy=1.16.2
tensorboardX
pip install tensorboardX
opencv-python
conda install --channel https://conda.anaconda.org/menpo opencv3