anaconda3多用户共享安装
> sudo bash Anaconda-latest-Linux-x86_64.sh
> 在linux下安装第三方多用户使用的共享软件一般都按在 /usr/local 目录
> 配置 /etc/profile 文件,在该文件最后加入export PATH=/usr/local/anaconda3/bin:$PATH
> source /etc/profile
创建conda虚拟环境
> conda info --envs
> conda create -n rasa_101 python=3.6.8
> conda activate rasa_101
> pip install rasa==1.0.1 -i https://pypi.tuna.tsinghua.edu.cn/simple
> pip install tensorflow==1.14.0 -i https://pypi.tuna.tsinghua.edu.cn/simple
> conda info --envs
-i 豆瓣源https://pypi.doubanio.com/simple
pychram->file->Settings->Project:->Project Interpreter
C:\Users\YCKJ2939\AppData\Local\Continuum\anaconda3\envs\rasa_101
在Notebook中切换conda虚拟环境
- 进入容器安装nb_conda插件
conda install nb_conda
- 进入虚拟环境安装jupyter
$: source activate env_name
$: conda install -y jupyter
- 退出虚拟环境重启jupyter
$: ps -aux | grep jupyter
$: kill pid
$: nohup jupyter notebook --ip=0.0.0.0 --no-browser --allow-root --port 8888 > jupyter.log 2>&1 &
- Error
# An error occurred while retrieving installed packages.
# EnvironmentLocationNotFound: Not a conda environment: /root/anaconda3/envs/anaconda3
# 解决方法:
# 找到Anaconda安装路径下nb_conda库的envmanager.py文件
# win系统在目录:Anaconda3\Lib\site-packages\nb_conda\envmanager.py
# linux系统在目录:/root/anaconda3/pkgs/nb_conda-2.2.1-py37_0/lib/python3.7/site-packages/nb_conda/envmanager.py
# 找到该文件后在83~86行代码改成如下代码:
return {
"environments": [root_env] + [get_info(env) for env in info['envs'] if env != root_env['dir']]
}
# 重启jupyter,参见上述
https://blog.csdn.net/IT_xiao_bai/article/details/102765922