Skip to content

Install python

emveepee edited this page Dec 11, 2021 · 6 revisions

Installing python with modules

Since it is easy to create extras with python this module explains how to install python so that it will work in a server environment

Windows

From https://www.python.org/downloads/ Download the current Windows installer (typically 64-bit)

  • Note It is not recommended to install the Windows Store version of python since it is much harder to work with Local system

Running the install

  1. Run the setup program

    Screen 1

    1. DO NOT click Install Now
    2. Click Add Python to PATH
    3. Click Customize Installation

    Screen 2

    1. On Optional feature you only need the pip option checked, but keeping defaults won't hurt
    2. Click Next

    Screen 3

    1. Check "Install for all users"
    2. You don't need to associate files or create shortcuts if you don't want to.
    3. Ensure "Add Python to environment variables" is checked.
    4. Click install and follow through to the end.

Installing required modules

  1. Open a command prompt as administrator

  2. To ensure python is working run the command

    python --version

    Then run the command

    pip list --version

    This will go through some configuration. Then run again

    pip list --version

    It should display at least two modules stored in the install location

  3. Run this command ton install the required modules

    pip install lxml requests m3u8

  4. Run the command

    pip list --version

    Ensure the added modules are not in the user folder

Linux

Python3 is usually pre-installed, if not follow the instruction on your distro

Run python3 --version to confirm.

To add modules install them as sudo so the server can see them

sudo pip3 install lxml requests m3u8

Docker

While python can be installed in sub's Docker, there are alternate Dockers for NextPVR that have python pre-installed

macOS

TBD

Clone this wiki locally