ubuntu16.04安装anconda环境

1.下载anconda的安装包

清华源:Anaconda3-2019.07-Linux-x86_64.shicon-default.png?t=N7T8https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-2019.07-Linux-x86_64.sh

2.安装anconda

test@test-virtual-machine:~$ bash Anaconda3-2019.07-Linux-x86_64.sh

一直回车

等待安装成功

重新打开一个终端。查看是否anaconda 安装成功

test@test-virtual-machine:~$ conda --version
conda:未找到命令

问题1:安装好anaconda3,但是conda:未找到命令。配置anconda3的路径到

因为环境变量没有设置正确。Anaconda的bin目录被添加到了PATH环境变量中。bash配置文件(如.bashrc.bash_profile),并添加以下行:

export PATH="/home/test/anaconda3/bin:$PATH"

使用文本编辑器打开.bashrc文件,进行添加在文件的最后

先打开文本编辑器—打开——其他文档——显示隐藏文件

再输入,可以看到conda的版本号,即anaconda3安装成功。

test@test-virtual-machine:~$ conda --version
conda 4.7.10

3.创建虚拟环境AI

test@test-virtual-machine:~$ conda create -n AI python=3.8
Collecting package metadata (current_repodata.json): done
Solving environment: failed with current_repodata.json, will retry with next repodata source.
Collecting package metadata (repodata.json): done
Solving environment: done
The following NEW packages will be INSTALLED:

  _libgcc_mutex      pkgs/main/linux-64::_libgcc_mutex-0.1-main
  ca-certificates    pkgs/main/linux-64::ca-certificates-2024.3.11-h06a4308_0
  ld_impl_linux-64   pkgs/main/linux-64::ld_impl_linux-64-2.38-h1181459_1
  libffi             pkgs/main/linux-64::libffi-3.3-he6710b0_2
  libgcc-ng          pkgs/main/linux-64::libgcc-ng-9.1.0-hdf63c60_0
  libstdcxx-ng       pkgs/main/linux-64::libstdcxx-ng-9.1.0-hdf63c60_0
  ncurses            pkgs/main/linux-64::ncurses-6.3-h7f8727e_2
  openssl            pkgs/main/linux-64::openssl-1.1.1w-h7f8727e_0
  pip                pkgs/main/linux-64::pip-23.3.1-py38h06a4308_0
  python             pkgs/main/linux-64::python-3.8.13-h12debd9_0
  readline           pkgs/main/linux-64::readline-8.1.2-h7f8727e_1
  setuptools         pkgs/main/linux-64::setuptools-68.2.2-py38h06a4308_0
  sqlite             pkgs/main/linux-64::sqlite-3.38.5-hc218d9a_0
  tk                 pkgs/main/linux-64::tk-8.6.12-h1ccaba5_0
  wheel              pkgs/main/linux-64::wheel-0.41.2-py38h06a4308_0
  xz                 pkgs/main/linux-64::xz-5.2.5-h7f8727e_1
  zlib               pkgs/main/linux-64::zlib-1.2.12-h7f8727e_2


Proceed ([y]/n)? y

4.切换虚拟环境

test@test-virtual-machine:~$ source activate AI
(AI) test@test-virtual-machine:~$

5.切换虚拟环境

(AI) test@test-virtual-machine:~$ jupyter lab
[I 11:05:09.430 LabApp] 把notebook 服务cookie密码写入 /home/test/.local/share/jupyter/runtime/notebook_cookie_secret
[I 11:05:09.748 LabApp] JupyterLab extension loaded from /home/test/anaconda3/lib/python3.7/site-packages/jupyterlab
[I 11:05:09.748 LabApp] JupyterLab application directory is /home/test/anaconda3/share/jupyter/lab
[I 11:05:09.749 LabApp] 启动notebooks 在本地路径: /home/test
[I 11:05:09.749 LabApp] 本程序运行在: http://localhost:8888/?token=2598d7a05fe0c92b86c565041ff8e8cb2855be88502dda77
[I 11:05:09.749 LabApp]  or http://127.0.0.1:8888/?token=2598d7a05fe0c92b86c565041ff8e8cb2855be88502dda77
[I 11:05:09.749 LabApp] 使用control-c停止此服务器并关闭所有内核(两次跳过确认).
[C 11:05:09.805 LabApp] 
    
    To access the notebook, open this file in a browser:
        file:///home/test/.local/share/jupyter/runtime/nbserver-55700-open.html
    Or copy and paste one of these URLs:
        http://localhost:8888/?token=2598d7a05fe0c92b86c565041ff8e8cb2855be88502dda77
     or http://127.0.0.1:8888/?token=2598d7a05fe0c92b86c565041ff8e8cb2855be88502dda77
[W 11:05:15.042 LabApp] Could not determine jupyterlab build status without nodejs

  • 6
    点赞
  • 13
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值