Jupyter notebooks установка linux

How to install Jupyter Notebook in Linux?

Jupyter Notebook is an open-source web application that allows you to create and share documents that contain live code, equations, visualizations, and narrative text. Uses include data cleaning and transformation, numerical simulation, statistical modeling, data visualization, machine learning, and much more.

Jupyter has support for over 40 different programming languages and Python is one of them. Python is a requirement (Python 3.3 or greater, or Python 2.7) for installing the Jupyter Notebook itself.

Jupyter Notebook can be installed by using either of the two ways described below:

  • Using Anaconda:
    Install Python and Jupyter using the Anaconda Distribution, which includes Python, the Jupyter Notebook, and other commonly used packages for scientific computing and data science. To install Anaconda, go through How to install Anaconda on Linux? and follow the instructions provided.
  • Using PIP:
    Install Jupyter using the PIP package manager used to install and manage software packages/libraries written in Python. To install pip, go through How to install PIP in Linux? and follow the instructions provided.

Installing Jupyter Notebook using Anaconda:

Anaconda is an open-source software that contains Jupyter, spyder, etc that are used for large data processing, data analytics, heavy scientific computing. Anaconda works for R and python programming language. Spyder(sub-application of Anaconda) is used for python. Opencv for python will work in spyder. Package versions are managed by the package management system called conda.

Читайте также:  Как получить sudo linux

To install Jupyter using Anaconda, just go through the following instructions:

  • Launch Anaconda Navigator:
    Anaconda Navigator Linux
  • Click on the Install Jupyter Notebook Button:
    Clicking Installation button
  • Beginning the Installation:
    Beginning Installation process
  • Loading Packages:
    Loading Packages to install
  • Finished Installation:
    Finishing Installation Process

Launching Jupyter:
Launching Jupyter on Linux
Jupyter Home Window

Installing Jupyter Notebook using pip:

PIP is a package management system used to install and manage software packages/libraries written in Python. These files are stored in a large “on-line repository” termed as Python Package Index (PyPI).
pip uses PyPI as the default source for packages and their dependencies.

To install Jupyter using pip, we need to first check if pip is updated in our system. Use the following command to update pip:

python3 -m pip install --upgrade pip

Updating pip before installation

After updating the pip version, follow the instructions provided below to install Jupyter:

  • Beginning Installation:
    Beginning with the Installation
  • Collecting Files and Data:
    Collecting Files to be downloaded
  • Downloading Packages:
    Downloading Packages
  • Running Installation:
    Finishing Installation
  • Finished Installation:
    Installing files and packages
  • Launching Jupyter:
    Use the following command to launch Jupyter using command-line:

    Источник

    Установка Jupyter Notebook на Ubuntu 18.04

    Ниже мы рассмотрим возможность установки веб-серверу под операционной системой Ubuntu приложения Jupyter Notebook и его подключения. Установка будет происходить при помощи языка программирования Python.

    Немного информации

    Jupyter Notebook является виртуальным приложением, у которого открыт исходный код. Оно помогает писать и делиться визуализацией, программным кодом и другими объектами. Поддерживается многими программными языками, в том числе Julia, Python, R, Руби, Haskell. Чаще всего используется для взаимодействия с большими объемами данных, статистической информацией и машинным обучением.

    Jupyter Notebook состоит из файлов, которые также называются «записными книжками». В них содержится кодовая часть и результат ее выполнения. Результат может быть представлен другим пользователям и воспроизведен сторонними юзерами.

    Как установить

    Для начала потребуется сделать зависимость через репозиторий Ubuntu, необходимую виртуальной среде для языка Python. Перед этим следует обновить базу с локальными пакетами:

    Потом устанавливается pip вместе с файлами заголовка Python, необходимых для создания зависимостей веб-приложения:

    Читайте также:  Деактивировать виртуальное окружение python linux

    Как создать виртуальное окружение

    Первым делом настраивается доступ пользователя для команды virtualenv:

    Атрибут -Н показывает, что безопасность задается переменным окружения для домашнего каталога.

    Затем нужно сделать и перейти в новую директорию, в которой будут храниться данные. Пусть названием служит каталог Serverspace:

    Там, внутри каталога, создается виртуальная среда для Python. Рекомендуется придумывать имя среды, тесно связанное со сферой проекта. Например, Serverspace:

    После таких процедур создастся окружение, в котором хранится Python и pip локальных версий. В последствии можно заняться настройками изолированных сред Python для веб-приложения.

    До установки Jupyter понадобится активация виртуальной среды. Таким образом, название Serverspace следует заменить другим, более актуальным и понятным именем среды:

    Как установить и запустить Jupyter

    После активации виртуальной среды инсталлировать веб-приложение можно через локальный экземпляр:

    Следующим образом можно подключить Jupyter Notebook на любой удаленной ПК либо веб-сервер через браузер с передаваемым токеном. Перед непосредственным запуском необходимо сделать открытие порта:

    Более подробный пример команды:

    Запустить приложение можно описанной ниже командой. В ней параметр —ip подскажет адреса, которые будут подключаться к виртуальному серверу Jupyter. Выставленные нули говорят о том, что подключиться можно с любым IP. Параметр —no-browser помогает провести запуск сервера без открытия браузеров. За указание портов для запуска отвечает —port=Port№. Непосредственное разрешение запуска включает —allow-root.

    Обратите внимание: для суперпользователей команда дополняется еще одним параметром —allow-root, который вносится в самом конце.

    Когда консоль будет запущена, на экране можно увидеть длинный путь с токеном. Далее необходимо перейти по данному адресу через браузер, заменив значения в скобках доменным именем либо реальным IP-адресом устройства.

    Скопируйте URL

    В конце возникнет рабочая область, предназначенная для взаимодействия пользователя с Python.

    Источник

    Installing the classic Jupyter Notebook interface#

    This section includes instructions on how to get started with Jupyter Notebook. But there are multiple Jupyter user interfaces one can use, based on their needs. Please checkout the list and links below for additional information and instructions about how to get started with each of them.

    Читайте также:  Мониторинг подключения usb linux

    This information explains how to install the Jupyter Notebook and the IPython kernel.

    Prerequisite: Python#

    While Jupyter runs code in many programming languages, Python is a requirement for installing the Jupyter Notebook. The Python version required differs between Jupyter Notebook releases (e.g. Python 3.6+ for Notebook v6.3, and Python 3.7+ for Notebook v7) .

    We recommend using the Anaconda distribution to install Python and Jupyter. We’ll go through its installation in the next section.

    Installing Jupyter using Anaconda and conda#

    For new users, we highly recommend installing Anaconda. Anaconda conveniently installs Python, the Jupyter Notebook, and other commonly used packages for scientific computing and data science.

    Use the following installation steps:

    1. Download Anaconda. We recommend downloading Anaconda’s latest Python 3 version (currently Python 3.9).
    2. Install the version of Anaconda which you downloaded, following the instructions on the download page.
    3. Congratulations, you have installed Jupyter Notebook. To run the notebook:

    Alternative for experienced Python users: Installing Jupyter with pip#

    Jupyter installation requires Python 3.3 or greater, or Python 2.7. IPython 1.x, which included the parts that later became Jupyter, was the last version to support Python 3.2 and 2.6.

    As an existing Python user, you may wish to install Jupyter using Python’s package manager, pip , instead of Anaconda.

    First, ensure that you have the latest pip; older versions may have trouble with some dependencies:

    Then install the Jupyter Notebook using:

    (Use pip if using legacy Python 2.)

    Congratulations. You have installed Jupyter Notebook. See Running the Notebook for more details.

    Upgrading Jupyter Notebook

    Источник

    Оцените статью
    Adblock
    detector