centos7 安装miniconda

1.先下载安装脚本

bash 复制代码
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

2.开始安装

bash 复制代码
bash Miniconda3-latest-Linux-x86_64.sh -b -p ~/miniconda3

-b: 以批处理模式安装,无需交互

-p:安装目录(不用提前创建)

3.添加环境变量

3.1针对用户

bash 复制代码
echo 'export PATH="/opt/miniconda3/bin:$PATH"' >> ~/.bashrc

3.2针对所有用户

bash 复制代码
echo 'export PATH="/opt/miniconda3/bin:$PATH"' >> /etc/profile

4.检查安装

bash 复制代码
# 命令
conda --version
# 结果
conda 23.9.0

5.初始化

bash 复制代码
source ~/.bashrc    # 单个用户
source /etc/profile # 全局用户
conda init bash     # 初始化
conda activate base   # 激活base环境
conda create -n common python=3.10  # 创建一个名为common的python版本为3.10的环境
相关推荐
曲幽5 小时前
FastAPI 身份验证总踩坑?这份 FastAPI Users “避坑指南”请收好
python·fastapi·web·jwt·oauth2·user·authentication
装不满的克莱因瓶5 小时前
掌握 RNN 与 LSTM 模型结构
人工智能·python·rnn·深度学习·神经网络·ai·lstm
何以解忧,唯有..5 小时前
Python包管理工具pip:从入门到精通
开发语言·python·pip
金銀銅鐵6 小时前
用 Tkinter 实现简单的猜数字游戏
后端·python
copyer_xyf6 小时前
Python 模块与包的导入导出
前端·后端·python
ice8130331816 小时前
【Python】Matplotlib折线图绘制
开发语言·python·matplotlib
copyer_xyf6 小时前
Python venv 虚拟环境
前端·后端·python
林爷万福7 小时前
GitHub 开源光谱数据处理项目推荐
python·光纤光谱仪
copyer_xyf8 小时前
Python 如何同时做很多事:进程、线程、协程
前端·后端·python
Full Stack Developme8 小时前
Spring Bean 依赖注入
python·spring·log4j