我在ubuntu上安装conda想要所有人都使用应该安装在哪里
- User
我在ubuntu上安装conda想要所有人都使用应该安装在哪里
Assistant
对于让所有用户都能使用conda,我建议安装在共享目录下。以下是具体步骤:
-
推荐安装位置:
/opt/conda -
安装步骤:
bash# 下载Miniconda安装脚本 wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh # 以root权限安装到/opt/conda sudo bash Miniconda3-latest-Linux-x86_64.sh -b -p /opt/conda # 修改目录权限,让所有用户可访问 sudo chmod -R 777 /opt/conda- 为所有用户配置环境变量,编辑
/etc/profile.d/conda.sh:
bashsudo vi /etc/profile.d/conda.sh添加以下内容:
bashexport PATH="/opt/conda/bin:$PATH"- 使环境变量生效:
bashsource /etc/profile.d/conda.sh-
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.