一、安装

1、安装包下载:

方式1:官网:https://www.anaconda.com/distribution/

方式2:清华镜像源:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/

2、安装方式:

windows:下载exe文件,双击安装即可

重点讲一下linux版本

1)下载.sh文件

2)在.sh文件目录中打开终端,或者终端切换到.sh安装包目录

3)修改.sh文件权限,命令如下:

# xxx.sh为安装包名字sudo chmod 777 xxx.sh

4)运行安装命令

# xxx.sh为安装包名字

./xxx.sh

5)一路回车,输入y(es)即可。

注意最后一步询问是否安装vscode,一般输no,因为在服务器里面都是用vim编辑器的,没必要多装一个。

6)配置环境变量

# annaconda3(2)根据版本确定

export PATH="/home/Sweeneys/anaconda3/bin:$PATH" # 刷新环境变量

source~/.bashrc

7)配置清华镜像源。

因为annaconda服务器在国外,安装package时候会很慢,甚至会经常出现连接不上服务器的情况,所以需将镜像源映射到国内清华镜像源(国内被授权的),命令如下:

# 添加Anaconda的TUNA镜像

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

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

# 设置搜索时显示通道地址

conda config--set show_channel_urls yes

配置好后,就开始放心使用了

常用命令

1、查看已安装的包

# 查看当前环境中的已安装的包

conda list

# 查看具有python的包

conda list| grep python

# 查看指定环境中的包

conda list -n python36

# 查看安装包的版本

conda show python

2、查找在线package信息

# 查看pandas在annaconda中所的版本

conda search pandas

3、安装package

# -n指定环境名称,不指定就是当前环境

# 可以通过-c指定通过某channel进行安装

condainstall -n python36 pandas# 更新包

conda update-n python36 pandas

# 删除package

conda remove-n python36 pandas

# 或者

conda uninstall -n python36 pandas

4、环境基本命令

#update最新版本的conda

conda update-n base conda # 指定环境

conda update conda # 当前环境

# 更新anaconda

conda update anaconda

# 更新pandas到最新版

conda update pandas

# 创建python3.6的名为xxxx的虚拟环境

conda create-n xxxx python=3.6# 进入xxxx环境

conda activate xxxx

# 关闭当前环境

conda deactivate

# 显示所有的虚拟环境

condaenvlist

# 或者

condainfo --envs

# 重命名环境

conda create--name newname --clone oldname # 以新名字克隆一个环境,--name=-n

conda remove--name oldname --all # 删除旧环境

GitHub 加速计划 / li / linux-dash
13
2
下载
A beautiful web dashboard for Linux
最近提交(Master分支:4 个月前 )
186a802e added ecosystem file for PM2 5 年前
5def40a3 Add host customization support for the NodeJS version 5 年前
Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐