python环境配置

一、安装anaconda

1.清华镜像下载anaconda。下载64位的,之前下载32位的出现安装pytorch找不到包

https://blog.csdn.net/qq_39594033/article/details/107201212/

 

2.notebook新增kernel

conda activate 环境名==============》conda install ipykernel===============》python -m ipykernel install --user --name tfenv --display-name "TFENV"

二、包安装

1.添加清华镜像源

conda config --add channels  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/

conda config --add channels  https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/

conda config --set show_channel_urls yes

2.恢复默认源

conda config --remove-key channels

 

3.下载pytorch

cpu版本的,一定要加cpuonly,不然会下载gpu版本的

conda install pytorch torchvision cpuonly -c pytorch

  

4.安装tensorflow

(原环境安装不了)

(1)重新创建环境

conda create --name tf15 python=3.7.3

(2)激活环境 

conda activate tf15

(3)下载tensorflow

conda install tensorflow=1.15.0

(4)离开环境

conda deactivate

 

5.安装sklearn

conda install  scikit-learn

 

6.安装ac自动机

conda install -c https://conda.anaconda.org/conda-forge pyahocorasick

posted @ 2022-04-16 20:23  HappierJoanne  阅读(39)  评论(0编辑  收藏  举报