首页 > 其他分享 >Anaconda——安装及基本使用

Anaconda——安装及基本使用

时间:2023-08-30 19:11:09浏览次数:40  
标签:基本 help -- remove environment conda Anaconda packages 安装

前言

官网:https://www.anaconda.com/
下载页面: https://www.anaconda.com/download (巨慢|还是访问tuna来下载吧)
清华大学开源软件镜像站:https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/

内容

安装很简单 | 下载完应用程序后,一步一步安装即可,切记一定要记得勾选写入path哦,不然需要自己配置环境变量

命令提示

PS C:\Users\WangYang> conda --help
usage: conda-script.py [-h] [--no-plugins] [-V] COMMAND ...

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

options:
  -h, --help          Show this help message and exit.
  --no-plugins        Disable all plugins that are not built into conda.
  -V, --version       Show the conda version number and exit.

commands:
  The following built-in and plugins subcommands are available.

  COMMAND
    build             Build conda packages from a conda recipe.
    clean             Remove unused packages and caches.
    compare           Compare packages between conda environments.
    config            Modify configuration values in .condarc.
    content-trust     See `conda content-trust --help`.
    convert           Convert pure Python packages to other platforms (a.k.a., subdirs).
    create            Create a new conda environment from a list of specified packages.
    debug             Debug the build or test phases of conda recipes.
    develop           Install a Python package in 'development mode'. Similar to `pip install --editable`.
    doctor            Display a health report for your environment.
    env               See `conda env --help`.
    index             Update package index metadata files. Pending deprecation, use https://github.com/conda/conda-
                      index instead.
    info              Display information about current conda install.
    init              Initialize conda for shell interaction.
    inspect           Tools for inspecting conda packages.
    install           Install a list of packages into a specified conda environment.
    list              List installed packages in a conda environment.
    metapackage       Specialty tool for generating conda metapackage.
    notices           Retrieve latest channel notifications.
    pack              See `conda pack --help`.
    package           Create low-level conda packages. (EXPERIMENTAL)
    remove (uninstall)
                      Remove a list of packages from a specified conda environment.
    rename            Rename an existing environment.
    render            Expand a conda recipe into a platform-specific recipe.
    repo              See `conda repo --help`.
    run               Run an executable in a conda environment.
    search            Search for packages and display associated information using the MatchSpec format.
    server            See `conda server --help`.
    skeleton          Generate boilerplate conda recipes.
    token             See `conda token --help`.
    update (upgrade)  Update conda packages to the latest compatible version.
    verify            See `conda verify --help`.

查看某一命令的帮助

PS C:\Users\WangYang> conda remove --help
usage: conda-script.py remove [-h] [-n ENVIRONMENT | -p PATH] [-c CHANNEL] [--use-local] [--override-channels]
                              [--repodata-fn REPODATA_FNS] [--experimental {jlap,lock}] [--all] [--features]
                              [--force-remove] [--no-pin]
                              [--solver {classic,libmamba} | --experimental-solver {classic,libmamba}] [-C] [-k]
                              [--offline] [--json] [-v] [-q] [-d] [-y] [--dev]
                              [package_name ...]

Remove a list of packages from a specified conda environment.
"Use `--all` flag to remove all packages and the environment itself."

This command will also remove any package that depends on any of the
specified packages as well---unless a replacement can be found without
that dependency. If you wish to skip this dependency checking and remove
just the requested packages, add the '--force' option. Note however that
this may result in a broken environment, so use this with caution.

positional arguments:
  package_name          Package names to remove from the environment.

options:
  -h, --help            Show this help message and exit.
  --dev                 Use `sys.executable -m conda` in wrapper scripts instead of CONDA_EXE. This is mainly for use
                        during tests where we test new conda sources against old Python versions.

Target Environment Specification:
  -n ENVIRONMENT, --name ENVIRONMENT
                        Name of environment.
  -p PATH, --prefix PATH
                        Full path to environment location (i.e. prefix).

Channel Customization:
  -c CHANNEL, --channel CHANNEL
                        Additional channel to search for packages. These are URLs searched in the order they are given
                        (including local directories using the 'file://' syntax or simply a path like
                        '/home/conda/mychan' or '../mychan'). Then, the defaults or channels from .condarc are
                        searched (unless --override-channels is given). You can use 'defaults' to get the default
                        packages for conda. You can also use any name and the .condarc channel_alias value will be
                        prepended. The default channel_alias is https://conda.anaconda.org/.
  --use-local           Use locally built packages. Identical to '-c local'.
  --override-channels   Do not search default or .condarc channels. Requires --channel.
  --repodata-fn REPODATA_FNS
                        Specify file name of repodata on the remote server where your channels are configured or
                        within local backups. Conda will try whatever you specify, but will ultimately fall back to
                        repodata.json if your specs are not satisfiable with what you specify here. This is used to
                        employ repodata that is smaller and reduced in time scope. You may pass this flag more than
                        once. Leftmost entries are tried first, and the fallback to repodata.json is added for you
                        automatically. For more information, see conda config --describe repodata_fns.
  --experimental {jlap,lock}
                        jlap: Download incremental package index data from repodata.jlap; implies 'lock'. lock: use
                        locking when reading, updating index (repodata.json) cache.

Solver Mode Modifiers:
  --all                 Remove all packages, i.e., the entire environment.
  --features            Remove features (instead of packages).
  --force-remove, --force
                        Forces removal of a package without removing packages that depend on it. Using this option
                        will usually leave your environment in a broken and inconsistent state.
  --no-pin              Ignore pinned package(s) that apply to the current operation. These pinned packages might come
                        from a .condarc file or a file in <TARGET_ENVIRONMENT>/conda-meta/pinned.
  --solver {classic,libmamba}
                        Choose which solver backend to use.
  --experimental-solver {classic,libmamba}
                        `--experimental-solver` is pending deprecation and will be removed in 24.3. Use `--solver`
                        instead.

Networking Options:
  -C, --use-index-cache
                        Use cache of channel index files, even if it has expired. This is useful if you don't want
                        conda to check whether a new version of the repodata file exists, which will save bandwidth.
  -k, --insecure        Allow conda to perform "insecure" SSL connections and transfers. Equivalent to setting
                        'ssl_verify' to 'false'.
  --offline             Offline mode. Don't connect to the Internet.

Output, Prompt, and Flow Control Options:
  --json                Report all output as json. Suitable for using conda programmatically.
  -v, --verbose         Can be used multiple times. Once for INFO, twice for DEBUG, three times for TRACE.
  -q, --quiet           Do not display progress bar.
  -d, --dry-run         Only display what would have been done.
  -y, --yes             Sets any confirmation values to 'yes' automatically. Users will not be asked to confirm any
                        adding, deleting, backups, etc.

Examples:

Remove the package 'scipy' from the currently-active environment::

    conda remove scipy

Remove a list of packages from an environemnt 'myenv'::

    conda remove -n myenv scipy curl wheel

Remove all packages from environment `myenv` and the environment itself::

    conda remove -n myenv --all

创建环境

# conda create -n <env name>
conda create -n test

查看已有环境

conda info --envs

激活环境

# activate <env name>
activate test

退出环境

conda deactivate

删除环境

conda remove -n test --all

使用

windows 环境下的演示

标签:基本,help,--,remove,environment,conda,Anaconda,packages,安装
From: https://www.cnblogs.com/wangyang0210/p/17668079.html

相关文章

  • 软件测试|Mac安装appium报权限问题
    前言appium是我们最常用的app自动化测试工具,基本上每一个自动化测试工程师都需要安装appium环境,我的一位朋友在给自己的新买的Mac电脑安装appium时出现了一个报错,报错指向权限被拒绝,无法下载appium,这是一个很普遍的权限问题,下面就为大家介绍一下解决appium安装时的权限被拒绝的......
  • ES 入门一:ES和Kibanin的安装&插件安装
    一、ES1、ES的安装:   官网下载,解压即用2、es的启动:部署的http://localhost:9200访问,页面的内容3、ES的插件的安装:(1)已安装插件的查看:    sudo./elasticsearch-pluginlist(2)安装插件:sudo./elasticsearch-plugininstallanalysis-icu 注意:es不允许roo......
  • BCLinux-docker安装配置
    一、系统介绍   Bclinux.x86_64、JDK1.8   系统下载地址:https://mirrors.cmecloud.cn/bclinux/二、Docker安装1、解压tar-xvfdocker-20.10.9.tgz2、将解压出来的docker文件内容移动到/usr/bin/目录下cpdocker/*/usr/bin/3、将docker注册为servicevim/etc/systemd/s......
  • c++数组基本用法
    在C++中,数组是一种最基本的数据结构,用于存储一组相同类型的元素。以下是有关C++数组的一些重要信息:1.**声明和初始化数组:**```cpp//声明一个整数数组,指定大小为5intmyArray[5];//初始化数组的同时赋值intanotherArray[3]={10,20,30};```2.**访问数组元素:**数组中的元......
  • kafka安装以及参数
    kafka安装安装JDKyuminstall-yjava-1.8.0-openjdk.x86_64查看版本java-versionkafka是分布式的,需要多台机器,并且保证机器之间是免密登录同时需要用zookeeper集群负责管理。1、kafka版本选择,从官网下载即可,我这使用的是kafka_2.12-2.70.tgz2、brokers节点分配,注......
  • centos 离线安装 mysql5.7
    下载离线安装包tarhttps://dev.mysql.com/downloads/mysql/5.7.html#downloads(mysql-5.7.43-linux-glibc2.12-x86_64.tar.gz)移动到安装目录解压/usr/local/tar-zxvfmysql-5.7.36-linux-glibc2.12-x86_64.tar.gzmv mysql-5.7.36-linux-glibc2.12-x86_64mysql创建用......
  • pg10 安装pageinspect插件
    1.切换到源码包的contrib路径下,ls插件名称cd/data/soft/PostGreSQL/postgresql-10.20/contrib/pageinspect编译该插件makegcc-Wall-Wmissing-prototypes-Wpointer-arith-Wdeclaration-after-statement-Wendif-labels-Wmissing-format-attribute-Wformat-security-fn......
  • docker 安装mysql
    dockerpullmysqldockerimagesdockerrun-p3306:3306--namemysql--restart=always--privileged=true\-v/usr/local/mysql/log:/var/log/mysql\-v/usr/local/mysql/data:/var/lib/mysql\-v/usr/local/mysql/conf:/etc/mysql\-v/etc/localtime:/et......
  • windows10创建conda环境失败:CondaHTTPError: HTTP 000 CONNECTION FAILED for url <htt
    问题描述创建新环境时,报错,创建不成功Collectingpackagemetadata(current_repodata.json):doneSolvingenvironment:doneCondaHTTPError:HTTP000CONNECTIONFAILEDforurl<https://conda.anaconda.org/conda-forge/linux-64/current_repodata.json>Elapsed:-AnHTTP......
  • RabbitMQ快速入门--介绍和安装
                     ......