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的环境
相关推荐
Flittly11 小时前
【从零手写 ClaudeCode:learn-claude-code 项目实战笔记】(3)TodoWrite (待办写入)
python·agent
千寻girling15 小时前
一份不可多得的 《 Django 》 零基础入门教程
后端·python·面试
databook18 小时前
探索视觉的边界:用 Manim 重现有趣的知觉错觉
python·动效
明月_清风20 小时前
Python 性能微观世界:列表推导式 vs for 循环
后端·python
明月_清风20 小时前
Python 性能翻身仗:从 O(n) 到 O(1) 的工程实践
后端·python
helloweilei1 天前
python 抽象基类
python
用户8356290780511 天前
Python 实现 PPT 转 HTML
后端·python
zone77392 天前
004:RAG 入门-LangChain读取PDF
后端·python·面试
zone77392 天前
005:RAG 入门-LangChain读取表格数据
后端·python·agent
树獭非懒2 天前
AI大模型小白手册|Embedding 与向量数据库
后端·python·llm