ubuntu系統配置Anaconda環境變量

1、安裝anaconda後,執行命令

$ conda
輸出 conda:未找到命令

2、在跟目錄下,打開etc/profile,添加anaconda環境變量

root@node01:/# vim etc/profile

在最後一行添加anoconda3/bin:

export PATH=/opt/software/anaconda3/bin:$PATH

# anconda3安裝路徑
# 可以使用以下命令查詢
# conda info --envs
root@node01:/# conda info --envs
# conda environments:
#
                         /home/wqy/.conda/envs/CenterNet
# base                  *  /opt/software/anaconda3

3、source etc/profile 激活即可(也可重啓)

檢查conda是否可用

root@node01:/# conda
usage: conda [-h] [-V] command ...

conda is a tool for managing and deploying applications, environments and packages.

Options:

positional arguments:
  command
    clean        Remove unused packages and caches.
    config       Modify configuration values in .condarc. This is modeled
                 after the git config command. Writes to the user .condarc
                 file (/root/.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:
  build
  convert
  debug
  develop
  env
  index
  inspect
  metapackage
  render
  server
  skeleton
  verify

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章