美文网首页大数据,技术类
ubuntu18.04下使用anaconda3搭建python环

ubuntu18.04下使用anaconda3搭建python环

作者: 陶笛微凉 | 来源:发表于2020-08-20 00:36 被阅读0次

    1.ubuntu18.04下安装完anaconda3

    我安装的是anaconda3。
    输入anaconda --version,显示anaconda Command line client (version 1.7.2)

    2.创建一个名为fllink(题目自拟)的python虚拟环境

    conda create -n flink创建成功。显示:

    mpshen@mpshen-virtual-machine:~$ conda create -n flink
    Solving environment: done
    
    ==> WARNING: A newer version of conda exists. <==
      current version: 4.5.11
      latest version: 4.8.4
    
    Please update conda by running
        $ conda update -n base -c defaults conda
    
    
    ## Package Plan ##
    environment location: /home/mpshen/.conda/envs/flink
    
    Proceed ([y]/n)?
    

    【注】一开始使用conda create -n flink python=3.6 -y创建虚拟环境失败

    输入y,

    Proceed ([y]/n)? y
    Preparing transaction: done
    Verifying transaction: done
    Executing transaction: done
    #
    # To activate this environment, use
    #
    #     $ conda activate flink
    #
    # To deactivate an active environment, use
    #
    #     $ conda deactivate
    
    

    3.激活虚拟环境

    输入conda activate flink
    激活成功。

    mpshen@mpshen-virtual-machine:~$ conda activate flink
    (flink) mpshen@mpshen-virtual-machine:~$
    

    4.测试是否激活成功

    测试是否激活成功,输入:which python

    (flink) mpshen@mpshen-virtual-machine:~$ which python
    /home/mpshen/anaconda3/bin/python
    

    虚拟环境flink激活成功

    相关文章

      网友评论

        本文标题:ubuntu18.04下使用anaconda3搭建python环

        本文链接:https://www.haomeiwen.com/subject/clpjjktx.html