Docs/Others/conda配置访问其他用户的env.md

21 lines
No EOL
555 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

**test2用户使用test1用户的env**
## 1.环境目录赋权
```shell
# 使需要使用env的用户拥有访问权限
# 若为同组用户775即可
chmod 777 /home/test1
```
## 2.创建软连接
```shell
# 当前用户下创建软链接
ln -s /home/test1/.conda/environments.txt /home/test2/.conda/environments.txt
```
## 3.显示环境名称
```shell
# 以上两步test2即可使用test1的env
# 使用 conda activate /path/to/env即可
# 但为了方便使用,可以添加环境名称
conda config --append envs_dirs /home/test1/.conda/envs
```