大数据,技术类

ubuntu18.04下使用anaconda3搭建python环

2020-08-20  本文已影响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激活成功

上一篇下一篇

猜你喜欢

热点阅读