- Установка Anaconda Python в Linux Mint
- Есть некоторые моменты, которые хотел уточнить.
- Installing on LinuxВ¶
- PrerequisitesВ¶
- InstallationВ¶
- Problems?В¶
- What’s next?¶
- Как установить Anaconda на Linux Mint 20
- Установите Anaconda на Linux Mint 20 Ulyana
- Шаг 1. Перед запуском приведенного ниже руководства важно убедиться, что ваша система обновлена, выполнив следующие apt команды в терминале:
- Шаг 2. Установка Anaconda на Linux Mint 20.
- Шаг 3. Проверьте установку Anaconda.
- Install Anaconda on Linux Mint.
- Introduction
- Step 1. Download Anaconda
- Step 2. Run the installation script
- Step 3. Run Anaconda Navigator
- Conclusion
- Installing and Using Anaconda on Linux Mint
- A Step-by-Step Guide
- Downloading Anaconda and Checking File Integrity
- Installing Extended Dependencies
- Installing Anaconda
- Beginning to Use Anaconda
- Fixing the Distro-Specific Problem
Установка Anaconda Python в Linux Mint
Ниже я опишу процесс установки Anaconda в Linux. В моем случае я устанавливаю в Linux Mint 20.1 , но процесс установки в Ubuntu отличаться не будет.
Сначала необходимо скачать установочный файл по адресу https://www.anaconda.com/products/individual, я сохранил его в папку Загрузки (/home/alex/Загрузки)
Далее открываем терминал в этой папке и запускаем скачанный файл командой:
Сначала нажимаем ENTER для начала процесса установки, на следующем шаге нас знакомят с лицензионным соглашением и жмем ENTER чтобы пролистать его до конца. После этого вводим yes и продолжаем установку.
На следующем шаге выбираем рекомендуемый параметр установки просто нажав ENTER.
На последнем шаге отвечаем на вопрос Do you wish the installer to initialize Anaconda3 by running conda init? yes и установка завершается.
Далее я просто перезапустил терминал и он включился уже с активированным окружением base
Чтобы запустить Anaconda Navigator просто вбейте в терминале команду
В принципе все готово.
Есть некоторые моменты, которые хотел уточнить.
Например, после установки Анаконды среда base автоматически активировалась при запуске терминала, мне это не нужно и я отключил это командой:
conda config —set auto_activate_base false
Теперь чтобы активировать окружение base нужно выполнить команду:
conda activate base
соответственно чтобы деактивировать ее нужно выполнить команду
Если при попытке запуска навигатора у вас появляется ошибка:
anaconda-navigator: команда не найдена
проверьте активирована ли у вас виртуальная среда, если что сначала выполните conda activate base, а потом еще раз anaconda-navigator.
Installing on LinuxВ¶
Using Anaconda in a commercial setting? You may need to purchase a license to stay compliant with our Terms of Service. This can be accomplished through Anaconda Professional, Anaconda Server, or Anaconda Enterprise. If you have already purchased Professional, please proceed to the Authenticating Anaconda Professional section after completing your installation here.
Haven’t purchased Anaconda Professional yet? Visit https://anaconda.cloud/register to get started.
PrerequisitesВ¶
To use GUI packages with Linux, you will need to install the following extended dependencies for Qt:
Debian | apt-get install libgl1-mesa-glx libegl1-mesa libxrandr2 libxrandr2 libxss1 libxcursor1 libxcomposite1 libasound2 libxi6 libxtst6 |
RedHat | yum install libXcomposite libXcursor libXi libXtst libXrandr alsa-lib mesa-libEGL libXdamage mesa-libGL libXScrnSaver |
ArchLinux | pacman -Sy libxau libxi libxss libxtst libxcursor libxcomposite libxdamage libxfixes libxrandr libxrender mesa-libgl alsa-lib libglvnd |
OpenSuse/SLES | zypper install libXcomposite1 libXi6 libXext6 libXau6 libX11-6 libXrandr2 libXrender1 libXss1 libXtst6 libXdamage1 libXcursor1 libxcb1 libasound2 libX11-xcb1 Mesa-libGL1 Mesa-libEGL1 |
Gentoo | emerge x11-libs/libXau x11-libs/libxcb x11-libs/libX11 x11-libs/libXext x11-libs/libXfixes x11-libs/libXrender x11-libs/libXi x11-libs/libXcomposite x11-libs/libXrandr x11-libs/libXcursor x11-libs/libXdamage x11-libs/libXScrnSaver x11-libs/libXtst media-libs/alsa-lib media-libs/mesa |
InstallationВ¶
For x86 systems.
Search for “terminal” in your applications and click to open.
In the terminal, run the following:
Install for Python 3.7 or 2.7 in the terminal:
For Python 3.7, enter the following:
For Python 2.7, enter the following:
Press Enter to review the license agreement. Then press and hold Enter to scroll.
Enter “yes” to agree to the license agreement.
Use Enter to accept the default install location, use CTRL+C to cancel the installation, or enter another file path to specify an alternate installation directory. If you accept the default install location, the installer displays PREFIX=/home/ /anaconda and continues the installation. It may take a few minutes to complete.
Anaconda recommends you accept the default install location. Do not choose the path as /usr for the Anaconda/Miniconda installation.
The installer prompts you to choose whether to initialize Anaconda Distribution by running conda init . Anaconda recommends entering “yes”.
If you enter “no”, then conda will not modify your shell scripts at all. In order to initialize after the installation process is done, first run source [PATH TO CONDA]/bin/activate and then run conda init . See FAQ .
The installer finishes and displays, “Thank you for installing Anaconda !”
Optional: The installer describes the partnership between Anaconda and JetBrains and provides a link to install Dataspell for Anaconda at https://www.anaconda.com/dataspell.
Close and re-open your terminal window for the installation to take effect, or enter the command source
/.bashrc to refresh the terminal.
You can also control whether or not your shell has the base environment activated each time it opens.
If you install multiple versions of Anaconda, the system defaults to the most current version, as long as you haven’t altered the default install path.
Problems?В¶
What’s next?¶
Get started programming quickly with Anaconda in the Getting started with Anaconda guide.
Как установить Anaconda на Linux Mint 20
В этом руководстве мы покажем вам, как установить Anaconda на Linux Mint 20. Для тех из вас, кто не знал, Anaconda — популярная платформа Python / R для науки о данных и машинного обучения, используемая для крупномасштабной обработки данных, прогнозирования. аналитика и научные вычисления.
В этой статье предполагается, что у вас есть хотя бы базовые знания Linux, вы знаете, как использовать оболочку, и, что наиболее важно, вы размещаете свой сайт на собственном VPS. Установка довольно проста и предполагает, что вы работаете с учетной записью root, в противном случае вам может потребоваться добавить ‘ sudo ‘ к командам для получения привилегий root. Я покажу вам пошаговую установку Anaconda python на Linux Mint 20 (Ульяна).
Установите Anaconda на Linux Mint 20 Ulyana
Шаг 1. Перед запуском приведенного ниже руководства важно убедиться, что ваша система обновлена, выполнив следующие apt команды в терминале:
Шаг 2. Установка Anaconda на Linux Mint 20.
Теперь скачиваем последнюю версию Anaconda с официальной страницы:
После этого проверьте целостность данных скрипта, выполнив sha256sum команду:
Сравните его с официальными хэшами для Anaconda . Если хеш-значение локально загруженного файла установщика совпадает с официальным хешем, все готово.
Затем установите Anaconda для Python 3.8, используя следующую команду:
Теперь продолжайте нажимать Enter, пока он не спросит:
Чтобы активировать установку Anaconda, вы можете либо закрыть и снова открыть оболочку, либо загрузить новую переменную среды PATH в текущий сеанс оболочки, набрав:
Шаг 3. Проверьте установку Anaconda.
Выполните следующую команду из Терминала, чтобы проверить установку Anaconda:
Поздравляю! Вы успешно установили Anaconda . Благодарим за использование этого руководства для установки последней версии Anaconda python в системе Linux Mint. Для получения дополнительной помощи или полезной информации мы рекомендуем вам посетить официальный сайт Anaconda .
Install Anaconda on Linux Mint.
Introduction
In this article I will go through the installation process of Anaconda onto Linux Mint.
Step 1. Download Anaconda
Go to anaconda.com and download the installation file as shown below.
After the downloading completes you will see the installation shell script:
Step 2. Run the installation script
Now open the terminal (CTRL+ALT+T) navigate to the directory where the installation file was downloaded and run the the script:
You will be asked to press Enter, and then to agree with the license terms, and then press Enter again to confirm the location of the installation:
Once the installation is finished you will be asked if you want to initialize Anaconda3 – answer yes. This will install the virtual environment which will be activated each time you open a terminal.
Then you will see the following message:
As you can see below the Anaconda virtual environment is activated in a new terminal without any actions:
You can disable this behavior by running:
The terminal output might be a bit different in your case, but generally should be pretty straightforward.
Step 3. Run Anaconda Navigator
To launch Anaconda GUI run the following command in terminal:
The GUI will open and you can start using the offered applications
On my initial attempt to run anaconda-navigator after fresh installation I got this error:
UnboundLocalError: local variable ‘DISTRO_NAME’ referenced before assignment
Quick Google search revealed (https://github.com/ContinuumIO/anaconda-issues/issues/11635) that the issue is solved by running:
Conclusion
I hope these instructions helped you to install Anaconda on your machine. Thank you for reading.
Installing and Using Anaconda on Linux Mint
A Step-by-Step Guide
Installing and using Anaconda on Linux Mint is not straightforward and you need to tweak some settings before you are able to use it.
Even though it is not straightforward, it is very easy to install and use Anaconda on Linux Mint.
Downloading Anaconda and Checking File Integrity
First go to Anaconda website, and if you are an individual user, select “Individual Edition” from the Download section and you will see something like this-
Download your desired version. If you don’t know which one to download, download the Python 3.7 version.
After you have downloaded it, navigate to the Downloads directory with terminal, and verify data integrity with SHA-256. Type-
Replace “file-name” with the actual filename of the file that has been downloaded ending with .sh and you will see something like 2b9f088b2022edb474915d9f69a803d6449d5fdb4c303041f60ac4aefcc208bb and that means that your download is okay.
Installing Extended Dependencies
Now you need to download extended dependencies for running Anaconda. Open the Terminal and type-
Some or all of the dependencies might already be installed. Don’t worry about that. It will take care of itself, and install needed dependencies.
Installing Anaconda
Open your terminal and type-
Use bash irrespective of your Shell.
Then it is pretty straightforward. You have to scroll to the end of the Terms and type yes to agree.
And it is recommended to use the default installation directory. And do not install Anaconda on /usr path.
And when this question comes up-
“Do you wish the installer to initialize Anaconda3 by running conda init?”
When the installation process is completed, a Thanks message will be displayed and you will be shown a link to install PyCharm for Anaconda.
That is the straightforward path, and easily reproducible from the official installation guide.
Beginning to Use Anaconda
When you have finished installing you will not see any launcher for Anaconda Navigator in the Applications Menu. You’d expect to see it, but you won’t.
Open up the Terminal, and type-
Anaconda won’t be added to the PATH by default. You need to do it. Open ./.bashrc , the Bash configuration file with your favorite text editor. I will be using nano. Type-
Navigate to the end of the file, and add the following lines-
Exit saving the file.
Now if you type conda —version , you can see the version, which means Anaconda is added to your PATH.
Fixing the Distro-Specific Problem
Restart your Terminal, and now if you type anaconda-navigator you will see the logo pop up, but it won’t open. You will see the error in the shell-
UnboundLocalError: local variable ‘DISTRO_NAME’ referenced before assignment
For fixing this, navigate to home/username/anaconda3/lib/python3.7/site-packages/anaconda_navigator/api/external_apps/
Open a file called vscode.py with any editor that shows line numbers. Go to line 159, and add the following in it-
And you need to indent it with the if that precedes it. This line is outside the if loop. The author(s) used Spaces to indent code, so you need to indent it with 8 Spaces. Like this-
Save the file, and exit.
Now open your Terminal again, and type anaconda-navigator , Anaconda will open and work perfectly well!