精华内容
下载资源
问答
  • Ubuntu18.04虚拟机安装Anaconda3

    千次阅读 2018-12-15 15:08:26
    下载Anaconda3镜像文件清华源 安装 执行如下命令完成安装 bash ./Anaconda3-5.3.1-Linux-x86_64.sh 重启~/.bashrc source ~/.bashrc

    下载Anaconda3镜像文件清华源

    在这里插入图片描述
    在这里插入图片描述

    安装

    • 执行如下命令完成安装
    bash ./Anaconda3-5.3.1-Linux-x86_64.sh
    

    在这里插入图片描述

    • 重启~/.bashrc
    source ~/.bashrc
    

    在这里插入图片描述

    展开全文
  • Ubuntu虚拟机安装anaconda3-5.3.1步骤

    千次阅读 2019-08-11 18:44:05
    首先从清华镜像站中下载好anaconda Linux版本的安装包 ... 然后打开Ubuntu终端,将路径指到安装包路径下边,然后...bash ./Anaconda3-5.3.1-Linux-x86_64.sh 按照要求一步一步往下运行,其中一步需要输入yes/no,输入y...

    首先从清华镜像站中下载好anaconda Linux版本的安装包
    https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/
    在这里插入图片描述
    然后打开Ubuntu终端,将路径指到安装包路径下边,然后在终端运行下面的命令:

    bash ./Anaconda3-5.3.1-Linux-x86_64.sh
    

    按照要求一步一步往下运行,其中一步需要输入yes/no,输入yes,
    在这里插入图片描述
    最后不需要安装vscode
    测试:
    在这里插入图片描述

    展开全文
  • (小白)虚拟机安装anaconda3+python3.6+TensorFlow 一、安装Anaconda 1、到https://www.anaconda.com/download/下载对应版本的anaconda,下文都是基于python3.6进行的 2、下载完成后,安装 Python3.6对应的...

    (小白)虚拟机下安装anaconda3+python3.6+TensorFlow
    一、安装Anaconda

    1、到https://www.anaconda.com/download/下载对应版本的anaconda,下文都是基于python3.6进行的

    2、下载完成后,安装 Python3.6对应的Anaconda

    安装anaconda的步骤
    1)、cd 桌面
    2)、ls
    3)、 bash 下载的anaconda的安装包
    4)、一直yes就行了
    如图所示在这里插入图片描述
    3. 出现more就一直按回车看证书信息,问是否接受license,输入yes
    在这里插入图片描述
    默认的路径为/home/username/anaconda3,不改变的话就直接按ENTER就好了,下面就是等待安装过程
    4. 到这里注意,询问是否将Anaconda3加入到环境变量中,选yes。因为默认是no,之后要用的话还要自己在环境变量中加一次
    在这里插入图片描述
    关闭当前终端,并重新开一个,或者执行命令source ~/.bashrc使得上面更新的环境变量生效。
    安装完成之后,打开新的Terminal终端,在终端中查看版本信息确认是否安装
    输入conda-V
    在这里插入图片描述
    至此安装完成

    如果报错,就配置一下anaconda 的环境变量
    在终端输入sudo gedit /etc/profile,打开profile文件。

    在文件末尾添加一行:export PATH=/home/用户名/anaconda3/bin:$PATH,保存
    在这里插入图片描述
    重启Linux 不然找不到命令

    再输入conda -V 验证即可
    二、使用Anaconda安装TensorFlow

    1. 创建名为tensorflow的conda环境,对应你的python版本
      conda create -n tensorflow python=3.6
      在这里插入图片描述
    2. 激活conda环境
      在这里插入图片描述
    3. 安装TensorFlow到你的conda环境中
      pip install --ignore-installed --upgrade tfBinaryURL,其中tfBinaryURL根据你的Python到这里找
      比如我用的是Python3.6的CPU only版本,则是
    pip install --ignore-installed --upgrade https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow-1.4.1-cp36-cp36m-linux_x86_64.whl
    
    

    在这里插入图片描述
    在这里插入图片描述
    三、验证
    验证是否安装成功。要做的:
    ①保证环境已经准备好去运行TensorFlow程序;
    ②运行一个短的TensorFlow程序
    打开一个终端,激活container,执行python命令

    source activate tensorflow
    python
    
    

    将下面简单的程序输入到你的python shell中

    # Python
    import tensorflow as tf
    hello = tf.constant('Hello, TensorFlow!')
    sess = tf.Session()
    print(sess.run(hello))
    
    

    结果打印:Hello, TensorFlow!表示安装成功。
    在这里插入图片描述
    总结:第一次安装TensorFlow环境,发现很困难,但是只要知道安装的规律就会发现其实很简单。首先一定要清楚自己操作系统中带的python版本。python版本和anaconda版本都有一定的规律,而且一定要统一。在确定好python版本之后就好确定TensorFlow的版本,这里的版本不能随便乱找。anaconda python 版本对应关系的链接 https://blog.csdn.net/yuejisuo1948/article/details/81043823

    展开全文
  • 文章目录一、安装anaconda1.1 下载Anaconda1.2 安装1.3 手动配置环境1.3.1 用户环境变量1.3.2 系统环境变量1.4 验证...3.6的对应的是 Anaconda3- 5.2,5.3以后的都是python 3.7。 anaconda python 版本对应关系 下载

    一、安装anaconda

    1.1 下载Anaconda

    清华源

    3.6的对应的是 Anaconda3- 5.2,5.3以后的都是python 3.7。
    anaconda python 版本对应关系

    下载的文件默认存放在:

    1.2 安装

    1、进入Anaconda2-5.2.0-Linux-x86_64.sh所在目录

    2、查询当前目录存在的所有文件:

    ls
    


    3、安装anaconda软件:

    bash Annconda2-5.2.0-Linux-x86_64.sh
    


    4、按下Enter按钮。

    5、按下Enter按钮或者空格键:
    在这里插入图片描述
    6、然后输入yes
    在这里插入图片描述7、Anaconda将会默认安装在/home/wf/anaconda2下,

    • 按下Enter键,安装在默认路径下。
    • CTRL-C停止安装软件。
    • 或者在下面输入安装目录。
      在这里插入图片描述

    8、💕💕💕安装完成后,询问我们是否要将环境变量加入/home/wf/.bashrc文件中,可以直接输入yes,但是由于我的误操作,直接跳过了此步骤。

    installation finished.
    Do you wish the installer to prepend the Anaconda2 install location
    to PATH in your /home/wf/.bashrc ? [yes|no]
    [no] >>> 
    You may wish to edit your .bashrc to prepend the Anaconda2 install location to PATH:
    
    export PATH=/home/wf/anaconda2/bin:$PATH
    
    Thank you for installing Anaconda2!
    

    9、询问是否安装VSCode,输入no,至此安装完成。



    安装的整个过程:

    wf@ubuntu:~/Downloads$ bash Anaconda2-5.2.0-Linux-x86_64.sh 
    
    Welcome to Anaconda2 5.2.0
    
    In order to continue the installation process, please review the license
    agreement.
    Please, press ENTER to continue
    >>> 
    ===================================
    Anaconda End User License Agreement
    ===================================
    
    Copyright 2015, Anaconda, Inc.
    
    All rights reserved under the 3-clause BSD License:
    
    Redistribution and use in source and binary forms, with or without modification, are permitted provided that the fo
    llowing conditions are met:
    
      * Redistributions of source code must retain the above copyright notice, this list of conditions and the followin
    g disclaimer.
      * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the follo
    wing disclaimer in the documentation and/or other materials provided with the distribution.
      * Neither the name of Anaconda, Inc. ("Anaconda, Inc.") nor the names of its contributors may be used to endorse 
    or promote products derived from this software without specific prior written permission.
    
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, 
    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE D
    ISCLAIMED. IN NO EVENT SHALL ANACONDA, INC. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DAT
    A, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
     LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
     ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    
    Notice of Third Party Software Licenses
    =======================================
    
    Anaconda Distribution contains open source software packages from third parties. These are available on an "as is" 
    basis and subject to their individual license agreements. These licenses are available in Anaconda Distribution or 
    at http://docs.anaconda.com/anaconda/pkg-docs. Any binary packages of these third party tools you obtain via Anacon
    da Distribution are subject to their individual licenses as well as the Anaconda license. Anaconda, Inc. reserves t
    he right to change which third party tools are provided in Anaconda Distribution.
    
    In particular, Anaconda Distribution contains re-distributable, run-time, shared-library files from the Intel(TM) M
    ath Kernel Library ("MKL binaries"). You are specifically authorized to use the MKL binaries with your installation
     of Anaconda Distribution. You are also authorized to redistribute the MKL binaries with Anaconda Distribution or i
    n the conda package that contains them. Use and redistribution of the MKL binaries are subject to the licensing ter
    ms located at https://software.intel.com/en-us/license/intel-simplified-software-license. If needed, instructions f
    or removing the MKL binaries after installation of Anaconda Distribution are available at http://www.anaconda.com.
    
    Anaconda Distribution also contains cuDNN software binaries from NVIDIA Corporation ("cuDNN binaries"). You are spe
    cifically authorized to use the cuDNN binaries with your installation of Anaconda Distribution. You are also author
    ized to redistribute the cuDNN binaries with an Anaconda Distribution package that contains them. If needed, instru
    ctions for removing the cuDNN binaries after installation of Anaconda Distribution are available at http://www.anac
    onda.com.
    
    
    Anaconda Distribution also contains Visual Studio Code software binaries from Microsoft Corporation ("VS Code"). Yo
    u are specifically authorized to use VS Code with your installation of Anaconda Distribution. Use of VS Code is sub
    ject to the licensing terms located at https://code.visualstudio.com/License.
    
    Cryptography Notice
    ===================
    
    This distribution includes cryptographic software. The country in which you currently reside may have restrictions 
    on the import, possession, use, and/or re-export to another country, of encryption software. BEFORE using any encry
    ption software, please check your country's laws, regulations and policies concerning the import, possession, or us
    e, and re-export of encryption software, to see if this is permitted. See the Wassenaar Arrangement http://www.wass
    enaar.org/ for more information.
    
    Anaconda, Inc. has self-classified this software as Export Commodity Control Number (ECCN) 5D992b, which includes m
    ass market information security software using or performing cryptographic functions with asymmetric algorithms. No
     license is required for export of this software to non-embargoed countries. In addition, the Intel(TM) Math Kernel
     Library contained in Anaconda, Inc.'s software is classified by Intel(TM) as ECCN 5D992b with no license required 
    for export to non-embargoed countries and Microsoft's Visual Studio Code software is classified by Microsoft as ECC
    N 5D992.c with no license required for export to non-embargoed countries.
    
    The following packages are included in this distribution that relate to cryptography:
    
    openssl
        The OpenSSL Project is a collaborative effort to develop a robust, commercial-grade, full-featured, and Open So
    urce toolkit implementing the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols as well as a 
    full-strength general purpose cryptography library.
    
    pycrypto
        A collection of both secure hash functions (such as SHA256 and RIPEMD160), and various encryption algorithms (A
    ES, DES, RSA, ElGamal, etc.).
    
    pyopenssl
        A thin Python wrapper around (a subset of) the OpenSSL library.
    
    kerberos (krb5, non-Windows platforms)
        A network authentication protocol designed to provide strong authentication for client/server applications by u
    sing secret-key cryptography.
    
    cryptography
        A Python library which exposes cryptographic recipes and primitives.
    
    
    Do you accept the license terms? [yes|no]
    [no] >>> yes
    
    Anaconda2 will now be installed into this location:
    /home/wf/anaconda2
    
      - Press ENTER to confirm the location
      - Press CTRL-C to abort the installation
      - Or specify a different location below
    
    [/home/wf/anaconda2] >>> 
    PREFIX=/home/wf/anaconda2
    
    installing: python-2.7.15-h1571d57_0 ...
    Python 2.7.15 :: Anaconda, Inc.
    installing: blas-1.0-mkl ...
    ······
    ······
    ······
    installing: seaborn-0.8.1-py27h633ea1e_0 ...
    installing: anaconda-5.2.0-py27_3 ...
    installation finished.
    Do you wish the installer to prepend the Anaconda2 install location
    to PATH in your /home/wf/.bashrc ? [yes|no]
    [no] >>> 
    You may wish to edit your .bashrc to prepend the Anaconda2 install location to PATH:
    
    export PATH=/home/wf/anaconda2/bin:$PATH
    
    Thank you for installing Anaconda2!
    
    ===========================================================================
    
    Anaconda is partnered with Microsoft! Microsoft VSCode is a streamlined
    code editor with support for development operations like debugging, task
    running and version control.
    
    To install Visual Studio Code, you will need:
      - Administrator Privileges
      - Internet connectivity
    
    Visual Studio Code License: https://code.visualstudio.com/license
    
    Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]
    >>>no
    

    1.3 手动配置环境

    安装完Anaconda还需要配置环境变量,由于在第8步的误操作,未自动添加anaconda的环境变量,因此需要手动添加环境变量。

    安装anaconda环境有两种方式:

    • 添加到用户环境变量中
    • 添加到系统环境变量中

    1.3.1 用户环境变量

    1、在当前用户的目录下进行环境变量的配置,使用vi或vim命令打开用户目录下的.bashrc文件(如果没有安装vim,则使用vi,或者输入sudo apt-get install vim 下载vim编辑器)。

    wf@ubuntu:~$ vim .bashrc
    

    2、打开后在文件的后面追加:

    # added by Anaconda2 installer
    export PATH="/home/wf/anaconda2/bin:$PATH"
    

    PATH后面的是Anaconda安装的位置,根据自己的路径来选择。
    vi/vim编辑器打开文件后按a可以进行编辑,编辑完成后按键盘esc键可以退出编辑,输入:wq 回车可以保存并退出。

    3、保存配置文件后,输入source命令激活环境:

    wf@ubuntu:~$ source ~/.bashrc 
    

    1.3.2 系统环境变量

    1、在终端输入sudo gedit /etc/profile,打开profile文件,此处会提示输入用户名的密码。
    在这里插入图片描述

    2、在文件末尾添加一行:export PATH=/home/用户名/anaconda2/bin:$PATH,点击保存文件,并关闭文件。

    3、使环境生效:

    wf@ubuntu:~$ source /etc/profile
    

    1.4 验证安装成功与否

    1、输入~$ conda -V,查看安装的版本号。
    若成功:
    在这里插入图片描述
    若安装失败:

    wf@ubuntu:/etc$ conda -V
    conda: command not found
    

    2、查询conda info:

    wf@ubuntu:~$ conda info
    
         active environment : None
           user config file : /home/wf/.condarc
     populated config files : 
              conda version : 4.5.4
        conda-build version : 3.10.5
             python version : 2.7.15.final.0
           base environment : /home/wf/anaconda2  (writable)
               channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                              https://repo.anaconda.com/pkgs/main/noarch
                              https://repo.anaconda.com/pkgs/free/linux-64
                              https://repo.anaconda.com/pkgs/free/noarch
                              https://repo.anaconda.com/pkgs/r/linux-64
                              https://repo.anaconda.com/pkgs/r/noarch
                              https://repo.anaconda.com/pkgs/pro/linux-64
                              https://repo.anaconda.com/pkgs/pro/noarch
              package cache : /home/wf/anaconda2/pkgs
                              /home/wf/.conda/pkgs
           envs directories : /home/wf/anaconda2/envs
                              /home/wf/.conda/envs
                   platform : linux-64
                 user-agent : conda/4.5.4 requests/2.18.4 CPython/2.7.15 Linux/4.15.0-123-generic ubuntu/16.04 glibc/2.23
                    UID:GID : 1000:1000
                 netrc file : None
               offline mode : False
    
    
    

    1.5 卸载anaconda

    1、找到自己安装Anaconda的目录,删除其文件夹:sudo rm -rf path/anaconda3

    wf@ubuntu:~$ sudo rm -rf anaconda2/
    [sudo] password for wf: 
    wf@ubuntu:~$ 
    
    

    2、 删除刚刚添加的系统环境:在这里插入代码片

    wf@ubuntu:~$ cd /etc
    wf@ubuntu:/etc$ sudo gedit profile
    (gedit:3600): IBUS-WARNING **: The owner of /home/wf/.config/ibus/bus is not root!
    (gedit:3600): Gtk-WARNING **: Calling Inhibit failed: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.gnome.SessionManager was not provided by any .service files
    

    3、删除环境变量export PATH=/home/wf/anaconda2/bin:$PATH
    在这里插入图片描述
    4、更新你的配置文件

    source /etc/profile
    

    参考:【Linux卸载Anaconda

    1.6 安装默认带python3.6的anaconda

    安装上面的安装方式,安装:

    wf@ubuntu:~/Downloads$ bash Anaconda3-5.2.0-Linux-x86_64.sh 
    
    Welcome to Anaconda3 5.2.0
    
    In order to continue the installation process, please review the license
    agreement.
    Please, press ENTER to continue
    >>> 
    ===================================
    Anaconda End User License Agreement
    ===================================
    
    Copyright 2015, Anaconda, Inc.
    
    All rights reserved under the 3-clause BSD License:
    
    Redistribution and use in source and binary forms, with or without modification,
     are permitted provided that the following conditions are met:
    
    ······
    
    Do you accept the license terms? [yes|no]
    [no] >>> yes
    
    Anaconda3 will now be installed into this location:
    /home/wf/anaconda3
    
      - Press ENTER to confirm the location
      - Press CTRL-C to abort the installation
      - Or specify a different location below
    
    [/home/wf/anaconda3] >>> 
    PREFIX=/home/wf/anaconda3
    installing: python-3.6.5-hc3d631a_2 ...
    Python 3.6.5 :: Anaconda, Inc.
    ...
    ...
    ...
    installing: anaconda-5.2.0-py36_3 ...
    installation finished.
    Do you wish the installer to prepend the Anaconda3 install location
    to PATH in your /home/wf/.bashrc ? [yes|no]
    [no] >>> yes
    
    Appending source /home/wf/anaconda3/bin/activate to /home/wf/.bashrc
    A backup will be made to: /home/wf/.bashrc-anaconda3.bak
    
    
    For this change to become active, you have to open a new terminal.
    
    Thank you for installing Anaconda3!
    
    ===========================================================================
    
    Anaconda is partnered with Microsoft! Microsoft VSCode is a streamlined
    code editor with support for development operations like debugging, task
    running and version control.
    
    To install Visual Studio Code, you will need:
      - Administrator Privileges
      - Internet connectivity
    
    Visual Studio Code License: https://code.visualstudio.com/license
    
    Do you wish to proceed with the installation of Microsoft VSCode? [yes|no]
    >>> no
    wf@ubuntu:~/Downloads$ 
    


    查看用户配置文件:

    # ~/.bashrc: executed by bash(1) for non-login shells.
    # see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
    # for examples
    
    # If not running interactively, don't do anything
    case $- in
        *i*) ;;
          *) return;;
    esac
    
    # don't put duplicate lines or lines starting with space in the history.
    # See bash(1) for more options
    HISTCONTROL=ignoreboth
    
    # append to the history file, don't overwrite it
    shopt -s histappend
    
    # for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
    HISTSIZE=1000
    HISTFILESIZE=2000
    
    # check the window size after each command and, if necessary,
    # update the values of LINES and COLUMNS.
    shopt -s checkwinsize
    
    # If set, the pattern "**" used in a pathname expansion context will
    # match all files and zero or more directories and subdirectories.
    #shopt -s globstar
    
    # make less more friendly for non-text input files, see lesspipe(1)
    [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
    
    # set variable identifying the chroot you work in (used in the prompt below)
    if [ -z "${debian_chroot:-}" ] && [ -r /etc/debian_chroot ]; then
        debian_chroot=$(cat /etc/debian_chroot)
    fi
    
    # set a fancy prompt (non-color, unless we know we "want" color)
    case "$TERM" in
        xterm-color|*-256color) color_prompt=yes;;
    esac
    
    # uncomment for a colored prompt, if the terminal has the capability; turned
    # off by default to not distract the user: the focus in a terminal window
    # should be on the output of commands, not on the prompt
    #force_color_prompt=yes
    
    if [ -n "$force_color_prompt" ]; then
        if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
            # We have color support; assume it's compliant with Ecma-48
            # (ISO/IEC-6429). (Lack of such support is extremely rare, and such
            # a case would tend to support setf rather than setaf.)
            color_prompt=yes
        else
            color_prompt=
        fi
    fi
    
    if [ "$color_prompt" = yes ]; then
        PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
    else
        PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
    fi
    unset color_prompt force_color_prompt
    
    # If this is an xterm set the title to user@host:dir
    case "$TERM" in
    xterm*|rxvt*)
        PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"
        ;;
    *)
        ;;
    esac
    
    # enable color support of ls and also add handy aliases
    if [ -x /usr/bin/dircolors ]; then
        test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
        alias ls='ls --color=auto'
        #alias dir='dir --color=auto'
        #alias vdir='vdir --color=auto'
    
        alias grep='grep --color=auto'
        alias fgrep='fgrep --color=auto'
        alias egrep='egrep --color=auto'
    fi
                                                                                   
    # colored GCC warnings and errors
    #export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
    
    # some more ls aliases
    alias ll='ls -alF'
    alias la='ls -A'
    alias l='ls -CF'
    
    # Add an "alert" alias for long running commands.  Use like so:
    #   sleep 10; alert
    alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s*[0-9]\+\s*//;s/[;&|]\s*alert$//'\'')"'
    
    # Alias definitions.
    # You may want to put all your additions into a separate file like
    # ~/.bash_aliases, instead of adding them here directly.
    # See /usr/share/doc/bash-doc/examples in the bash-doc package.
    
    if [ -f ~/.bash_aliases ]; then
        . ~/.bash_aliases
    fi
    
    # enable programmable completion features (you don't need to enable
    # this, if it's already enabled in /etc/bash.bashrc and /etc/profile
    # sources /etc/bash.bashrc).
    if ! shopt -oq posix; then
      if [ -f /usr/share/bash-completion/bash_completion ]; then
        . /usr/share/bash-completion/bash_completion
      elif [ -f /etc/bash_completion ]; then
        . /etc/bash_completion
      fi
    fi
    
    # added by Anaconda3 installer
    export PATH="/home/wf/anaconda3/bin:$PATH"
    

    二、anaconda使用

    2.1 配置虚拟环境

    1、配置py3.7的虚拟环境,环境名称为CCNet37conda create -n CCNet37 python=3.7

    wf@ubuntu:~$ conda create -n CCNet37 python=3.7
    Solving environment: done
    
    
    ==> WARNING: A newer version of conda exists. <==
      current version: 4.5.4
      latest version: 4.9.2
    
    Please update conda by running
    
        $ conda update -n base conda
    
    
    
    ## Package Plan ##
    
      environment location: /home/wf/anaconda3/envs/CCNet37
    
      added / updated specs: 
        - python=3.7
    
    
    The following packages will be downloaded:
    
        package                    |            build
        ---------------------------|-----------------
        libffi-3.3                 |       he6710b0_2          54 KB
        readline-8.0               |       h7b6447c_0         428 KB
        certifi-2020.6.20          |     pyhd3eb1b0_3         159 KB
        libedit-3.1.20191231       |       h14c3975_1         121 KB
        setuptools-50.3.1          |   py37h06a4308_1         901 KB
        libgcc-ng-9.1.0            |       hdf63c60_0         8.1 MB
        ld_impl_linux-64-2.33.1    |       h53a641e_7         645 KB
        sqlite-3.33.0              |       h62c20be_0         2.0 MB
        python-3.7.9               |       h7579374_0        52.8 MB
        openssl-1.1.1h             |       h7b6447c_0         3.8 MB
        pip-20.2.4                 |   py37h06a4308_0         2.0 MB
        wheel-0.35.1               |     pyhd3eb1b0_0          37 KB
        ca-certificates-2020.10.14 |                0         128 KB
        xz-5.2.5                   |       h7b6447c_0         438 KB
        tk-8.6.10                  |       hbc83047_0         3.2 MB
        _libgcc_mutex-0.1          |             main           3 KB
        ncurses-6.2                |       he6710b0_1         1.1 MB
        zlib-1.2.11                |       h7b6447c_3         120 KB
        libstdcxx-ng-9.1.0         |       hdf63c60_0         4.0 MB
        ------------------------------------------------------------
                                               Total:        80.0 MB
    
    The following NEW packages will be INSTALLED:
    
        _libgcc_mutex:    0.1-main               
        ca-certificates:  2020.10.14-0           
        certifi:          2020.6.20-pyhd3eb1b0_3 
        ld_impl_linux-64: 2.33.1-h53a641e_7      
        libedit:          3.1.20191231-h14c3975_1
        libffi:           3.3-he6710b0_2         
        libgcc-ng:        9.1.0-hdf63c60_0       
        libstdcxx-ng:     9.1.0-hdf63c60_0       
        ncurses:          6.2-he6710b0_1         
        openssl:          1.1.1h-h7b6447c_0      
        pip:              20.2.4-py37h06a4308_0  
        python:           3.7.9-h7579374_0       
        readline:         8.0-h7b6447c_0         
        setuptools:       50.3.1-py37h06a4308_1  
        sqlite:           3.33.0-h62c20be_0      
        tk:               8.6.10-hbc83047_0      
        wheel:            0.35.1-pyhd3eb1b0_0    
        xz:               5.2.5-h7b6447c_0       
        zlib:             1.2.11-h7b6447c_3      
    
    Proceed ([y]/n)? y
    
    
    Downloading and Extracting Packages
    libffi-3.3           |   54 KB | ####################################### | 100% 
    readline-8.0         |  428 KB | ####################################### | 100% 
    certifi-2020.6.20    |  159 KB | ####################################### | 100% 
    libedit-3.1.20191231 |  121 KB | ####################################### | 100% 
    setuptools-50.3.1    |  901 KB | ####################################### | 100% 
    libgcc-ng-9.1.0      |  8.1 MB | ####################################### | 100% 
    ld_impl_linux-64-2.3 |  645 KB | ####################################### | 100% 
    sqlite-3.33.0        |  2.0 MB | ####################################### | 100% 
    python-3.7.9         | 52.8 MB | ####################################### | 100% 
    openssl-1.1.1h       |  3.8 MB | ####################################### | 100% 
    pip-20.2.4           |  2.0 MB | ####################################### | 100% 
    wheel-0.35.1         |   37 KB | ####################################### | 100% 
    ca-certificates-2020 |  128 KB | ####################################### | 100% 
    xz-5.2.5             |  438 KB | ####################################### | 100% 
    tk-8.6.10            |  3.2 MB | ####################################### | 100% 
    _libgcc_mutex-0.1    |    3 KB | ####################################### | 100% 
    ncurses-6.2          |  1.1 MB | ####################################### | 100% 
    zlib-1.2.11          |  120 KB | ####################################### | 100% 
    libstdcxx-ng-9.1.0   |  4.0 MB | ####################################### | 100% 
    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done
    #
    # To activate this environment, use:
    # > source activate CCNet37
    #
    # To deactivate an active environment, use:
    # > source deactivate
    #
    
    wf@ubuntu:~$ 
    
    

    2、激活虚拟环境

    wf@ubuntu:~$ source activate CCNet37
    (CCNet37) wf@ubuntu:~$ 
    (CCNet37) wf@ubuntu:~$ 
    (CCNet37) wf@ubuntu:~$ 
    

    3、退出虚拟环境:

    (CCNet37) wf@ubuntu:~$ source deactivate 
    wf@ubuntu:~$ 
    

    2.2 换源

    1、查询默认的源:

    wf@ubuntu:~$ conda info
    
         active environment : None
           user config file : /home/wf/.condarc
     populated config files : 
              conda version : 4.5.4
        conda-build version : 3.10.5
             python version : 3.6.5.final.0
           base environment : /home/wf/anaconda3  (writable)
               channel URLs : https://repo.anaconda.com/pkgs/main/linux-64
                              https://repo.anaconda.com/pkgs/main/noarch
                              https://repo.anaconda.com/pkgs/free/linux-64
                              https://repo.anaconda.com/pkgs/free/noarch
                              https://repo.anaconda.com/pkgs/r/linux-64
                              https://repo.anaconda.com/pkgs/r/noarch
                              https://repo.anaconda.com/pkgs/pro/linux-64
                              https://repo.anaconda.com/pkgs/pro/noarch
              package cache : /home/wf/anaconda3/pkgs
                              /home/wf/.conda/pkgs
           envs directories : /home/wf/anaconda3/envs
                              /home/wf/.conda/envs
                   platform : linux-64
                 user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.5 Linux/4.15.0-123-generic ubuntu/16.04 glibc/2.23
                    UID:GID : 1000:1000
                 netrc file : None
               offline mode : False
    
    

    2、添加清华的源:

    wf@ubuntu:~$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
    wf@ubuntu:~$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge 
    wf@ubuntu:~$ conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
    wf@ubuntu:~$ conda config --set show_channel_urls yes
    

    3、查看anaconda的配置文件:

    wf@ubuntu:~$ vim ~/.condarc
    


    4、去除- defaults
    再次查询conda info

    wf@ubuntu:~$ conda info
    
         active environment : None
           user config file : /home/wf/.condarc
     populated config files : /home/wf/.condarc
              conda version : 4.5.4
        conda-build version : 3.10.5
             python version : 3.6.5.final.0
           base environment : /home/wf/anaconda3  (writable)
               channel URLs : https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/linux-64
                              https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/noarch
                              https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/linux-64
                              https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge/noarch
                              https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/linux-64
                              https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/noarch
              package cache : /home/wf/anaconda3/pkgs
                              /home/wf/.conda/pkgs
           envs directories : /home/wf/anaconda3/envs
                              /home/wf/.conda/envs
                   platform : linux-64
                 user-agent : conda/4.5.4 requests/2.18.4 CPython/3.6.5 Linux/4.15.0-123-generic ubuntu/16.04 glibc/2.23
                    UID:GID : 1000:1000
                 netrc file : None
               offline mode : False
    
    wf@ubuntu:~$ 
    
    展开全文
  • linux 虚拟机下载Anaconda问题解决: 1.下载 下载conda包------- https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/ 一般是下载最新的版本,具体看个人需求。 下载完直接拖到虚拟机里,然后执行命令: bash +...
  • ubuntu 虚拟机搭建anaconda3.5

    千次阅读 2017-10-11 19:10:44
    Ubuntu虚拟机下python3.6安装

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 7,920
精华内容 3,168
关键字:

虚拟机安装anaconda3