Android

Sådan installeres anaconda på centos 7

How to Install and Configure Git and GitHub on Windows

How to Install and Configure Git and GitHub on Windows

Indholdsfortegnelse:

Anonim

Anaconda er den mest populære python-datavidenskab og maskinindlæringsplatform, der bruges til storskala databehandling, forudsigelig analyse og videnskabelig computing. Anaconda distribution distribueres med mere end 1.000 datapakker, conda kommandolinjeværktøj og med en grafisk brugergrænseflade på skrivebordet kaldet Anaconda Navigator.

Denne tutorial vil gennemgå trinene til download og installation af Anaconda til Python 3 på CentOS 7.

Installation af Anaconda

På dette tidspunkt, hvor denne artikel skrives, er den seneste stabile version af Anaconda version 5.3.1. Før du downloader Anaconda-installationsskriptet, skal du besøge siden Anaconda Downloads og kontrollere, om der er en ny version af Anaconda for Python 3, der kan downloades.

Kør Anaconda-installationsskriptet

For at starte Anaconda-installationsprocessen skal du køre installationsskriptet:

bash Anaconda3-5.3.1-Linux-x86_64.sh

Du skal se en output på følgende måde:

Welcome to Anaconda3 5.3.1 In order to continue the installation process, please review the license agreement. Please, press ENTER to continue

Tryk på ENTER at fortsætte, og tryk derefter på ENTER at rulle gennem licensen. Når du er færdig med at gennemgå licensen, bliver du bedt om at godkende licensbetingelserne:

Do you accept the license terms?

Skriv yes at acceptere licensen, og du bliver bedt om at vælge installationsstedet.

Anaconda3 will now be installed into this location: /home/linuxize/anaconda3 - Press ENTER to confirm the location - Press CTRL-C to abort the installation - Or specify a different location below

Standardplaceringen er fin for de fleste brugere. Tryk på ENTER at bekræfte placeringen, og installationsprocessen fortsætter.

Installationen kan tage noget tid, og når den er afsluttet, vises følgende output:

Installation finished. Do you wish the installer to initialize Anaconda3 in your /home/linuxize/.bashrc ?

Appending source /home/linuxize/anaconda3/bin/activate to /home/linuxize/.bashrc A backup will be made to: /home/linuxize/.bashrc-anaconda3.bak For this change to become active, you have to open a new terminal. Thank you for installing Anaconda3!

Installationsprogrammet spørger dig også, om du gerne vil downloade og installere Visual Studio Code.

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?

Du kan finde mere information om Visual Studio på editorens websted. Hvis du vil installere Visual Studio-kodetype yes ellers skrive no .

For at aktivere Anaconda-installationen skal du indlæse den nye PATH miljøvariabel, som blev tilføjet af Anaconda-installationsprogrammet i den aktuelle shell-session med følgende kommando:

source ~/.bashrc

Kontroller installationen

Du kan verificere din Anaconda-installation ved hjælp af kommandokommandoen. For eksempel for at få vist oplysninger om den aktuelle type conda-installation:

conda info

active environment: base active env location: /home/linuxize/anaconda3 shell level: 1 user config file: /home/linuxize/.condarc populated config files: conda version: 4.5.11 conda-build version: 3.15.1 python version: 3.7.0.final.0 base environment: /home/linuxize/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/linuxize/anaconda3/pkgs /home/linuxize/.conda/pkgs envs directories: /home/linuxize/anaconda3/envs /home/linuxize/.conda/envs platform: linux-64 user-agent: conda/4.5.11 requests/2.19.1 CPython/3.7.0 Linux/3.10.0-957.1.3.el7.x86_64 centos/7 glibc/2.17 UID:GID: 0:0 netrc file: None offline mode: False

Opdaterer Anaconda

Opdatering af Anaconda er en temmelig ligefrem proces, først opdater conda-værktøjet med:

conda update conda

Når du bliver bedt om at bekræfte opdateringen, skal du skrive y at fortsætte.

Når conda er opdateret, skal du fortsætte med Anaconda-opdateringen:

conda update anaconda

Samme som med den forrige kommando, når du bliver bedt om det, skriv y at fortsætte.

Du skal regelmæssigt opdatere din Anaconda-installation.

Afinstallation af Anaconda

  1. Fjern Anaconda-installationsmappen.

    Sådan fjernes hele Anaconda-installationsmappetypen:

    rm -rf ~/anaconda3

    Rediger PATH-miljøvariablen.

    Rediger ~/.bashrc filen og fjern koden tilføjet af Anaconda-installationsprogrammet:

    ~ /.Bashrc

    # added by Anaconda3 5.3.1 installer # >>> conda init >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$(CONDA_REPORT_ERRORS=false '/home/linuxize/anaconda3/bin/conda' shell.bash hook 2> /dev/null)" if; then \eval "$__conda_setup" else if; then. "/home/linuxize/anaconda3/etc/profile.d/conda.sh" CONDA_CHANGEPS1=false conda activate base else \export PATH="/home/linuxize/anaconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda init <<<

    Fjern de skjulte filer.

    Den følgende kommando fjerner de skjulte filer og mapper, der er oprettet i dit brugerhåndbog:

    rm -rf ~/.condarc ~/.conda ~/.continuum

Konklusion

Nu, hvor du har downloadet og installeret Anaconda dit CentOS-system, kan du kontrollere den officielle Kom godt i gang med conda guide.

centos anaconda