当前位置: 首页 > news >正文

AutoDL 云服务器:普通 用户 miniconda 配置

AutoDL 初始状态下只有root用户,miniconda 安装在root用户目录下

///

增加普通用户

root@autodl-container-1c0641804d-5bb7040c:~/Desktop# apt updateroot@autodl-container-1c0641804d-5bb7040c:~/Desktop#  apt install sudoroot@autodl-container-1c0641804d-5bb7040c:~/Desktop# adduser zhenglfroot@autodl-container-1c0641804d-5bb7040c:~/Desktop# usermod -aG sudo zhenglfroot@autodl-container-1c0641804d-5bb7040c:~/Desktop# su zhenglf

普通用户conda配置

zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ python
bash: python: command not found
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda
bash: conda: command not found
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ sudo /root/miniconda3/bin/conda init bash
no change     /root/miniconda3/condabin/conda
no change     /root/miniconda3/bin/conda
no change     /root/miniconda3/bin/conda-env
no change     /root/miniconda3/bin/activate
no change     /root/miniconda3/bin/deactivate
no change     /root/miniconda3/etc/profile.d/conda.sh
no change     /root/miniconda3/etc/fish/conf.d/conda.fish
no change     /root/miniconda3/shell/condabin/Conda.psm1
no change     /root/miniconda3/shell/condabin/conda-hook.ps1
no change     /root/miniconda3/lib/python3.8/site-packages/xontrib/conda.xsh
no change     /root/miniconda3/etc/profile.d/conda.csh
no change     /home/zhenglf/.bashrc
No action taken.
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ source  /home/zhenglf/.bashrc
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ cat  /home/zhenglf/.bashrc | grep conda
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/root/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"eval "$__conda_setup"if [ -f "/root/miniconda3/etc/profile.d/conda.sh" ]; then. "/root/miniconda3/etc/profile.d/conda.sh"export PATH="/root/miniconda3/bin:$PATH"
unset __conda_setup
# <<< conda initialize <<<
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda
bash: conda: command not found
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ sudo chmod -R 777 /root
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda
usage: conda [-h] [-V] command ...conda is a tool for managing and deploying applications, environments and packages.Options:positional arguments:commandclean        Remove unused packages and caches.compare      Compare packages between conda environments.config       Modify configuration values in .condarc. This is modeled after the git config command. Writes to the user .condarc file (/home/zhenglf/.condarc) by default.create       Create a new conda environment from a list of specified packages.help         Displays a list of available conda commands and their help strings.info         Display information about current conda install.init         Initialize conda for shell interaction. [Experimental]install      Installs a list of packages into a specified conda environment.list         List linked packages in a conda environment.package      Low-level conda package utility. (EXPERIMENTAL)remove       Remove a list of packages from a specified conda environment.uninstall    Alias for conda remove.run          Run an executable in a conda environment. [Experimental]search       Search for packages and display associated information. The input is a MatchSpec, a query language for conda packages. See examples below.update       Updates conda packages to the latest compatible version.upgrade      Alias for conda update.optional arguments:-h, --help     Show this help message and exit.-V, --version  Show the conda version number and exit.conda commands available from other packages:env
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda env list
# conda environments:
#
base                  *  /root/miniconda3zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda activate baseCommandNotFoundError: Your shell has not been properly configured to use 'conda activate'.
To initialize your shell, run$ conda init <SHELL_NAME>Currently supported shells are:- bash- fish- tcsh- xonsh- zsh- powershellSee 'conda init --help' for more information and options.IMPORTANT: You may need to close and restart your shell after running 'conda init'.zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ source  /root/miniconda3/bin/activate
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda deactivate
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ conda activate base
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ which python
/root/miniconda3/bin/python
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$

(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$ history1  sudo /root/miniconda3/bin/conda init bash2  cat  /home/zhenglf/.bashrc3  python4  python35  source  /home/zhenglf/.bashrc6  python7  reset8  python9  conda10  sudo /root/miniconda3/bin/conda init bash11  cat  /home/zhenglf/.bashrc12  cat  /home/zhenglf/.bashrc | grep conda13  reset14  python15  conda16  sudo /root/miniconda3/bin/conda init bash17  source  /home/zhenglf/.bashrc18  cat  /home/zhenglf/.bashrc | grep conda19  conda20  sudo chmod -R 777 /root21  conda22  conda env list23  conda activate base24  source  /root/miniconda3/bin/activate25  conda deactivate26  conda activate base27  which python28  history
(base) zhenglf@autodl-container-b8974ea189-5aa9b74e:/root$

///

http://www.lryc.cn/news/528439.html

相关文章:

  • 渲染流程概述
  • 前端力扣刷题 | 4:hot100之 子串
  • Julia 之 @btime 精准测量详解
  • 【Django教程】用户管理系统
  • 【机器学习】自定义数据集 使用pytorch框架实现逻辑回归并保存模型,然后保存模型后再加载模型进行预测
  • C语言连接Mysql
  • Windows上通过Git Bash激活Anaconda
  • 面试经典150题——图
  • 学习数据结构(1)时间复杂度
  • 项目集成GateWay
  • 【Ubuntu】使用远程桌面协议(RDP)在Windows上远程连接Ubuntu
  • python3+TensorFlow 2.x 基础学习(一)
  • 《活出人生的厚度》
  • 安装 docker 详解
  • 【Rust自学】16.3. 共享状态的并发
  • 开发者交流平台项目部署到阿里云服务器教程
  • 【2024年华为OD机试】 (B卷,100分)- 乘坐保密电梯(JavaScriptJava PythonC/C++)
  • maven的打包插件如何使用
  • solidity高阶 -- 线性继承
  • 国内外大语言模型领域发展现状与预期
  • 【Leetcode 热题 100】416. 分割等和子集
  • C语言------数组从入门到精通
  • 物管系统赋能智慧物业管理提升服务质量与工作效率的新风潮
  • 2024年记 | 凛冬将至
  • MySQL数据导入与导出
  • NoSQL与SQL比较
  • Ceph:关于Ceph 中使用 RADOS 块设备提供块存储的一些笔记整理(12)
  • Android SystemUI——最近任务列表启动(十八)
  • 数据结构课程设计(三)构建决策树
  • 从ChatGPT热潮看智算崛起