Download_and_Install_Python_and_Flask_Software

Download and Install Python and Flask Software:

Download and install the latest version of Python for your hosted server.

Obtain the latest Python 3.7.x version from: - https://www.python.org/downloads/release/python-370/

Python Installation Procedure

Once the downloaded installation setup wizard starts, you will be asked to select either Install Now (default) or Customize installation.

Select Customize installation and check the box at the bottom of the pop-up window to Add Python 3.7 to PATH.

Check additional boxes as shown in the next screen.

Click Next

  • As a convenience, select an install directory that is easily accessible
  • In this example we chose: C:\partner_server
    • This directory contains all the Python modules

On the next screen you will see Advanced Options

  • Check additional boxes as shown

Enter the directory path; C:\partner_server in the Customize install location field.

Click Install to complete the installation.

Setup Python Environmental Variables

Once Python is installed, two (2) environmental variables need to be defined.

In the Windows search bar, type "environmental variables". The following window displays:

Click on "Edit the system environment variables". The System Properties window displays:

Select "Advanced" tab.

Click on "Environment Variables" button. The Environment Variables window displays:

Highlight the System variable "Path".

Select "Edit..."; the Edit environment variable window displays over the top of the Environment Variables display.

Select “New” to add the first of two (2) environmental variables.

Add *C:\partner_server* to the list.

Select “New” for the second environment variable.

Add *C:\partner_server\Scripts* to the list. The following results are displayed:

Select OK – to close Path edit

Select OK – to close Environment Variables

Select Ok to close System Properties.

Shutdown and restart the PC to refresh the System Environment Variables.

Install Flask add-on to Python

Flask is a Python add-on that allows partner-managed devices to communicate over WiFi to the management server systems.

Flask must be installed into the Python system for WIFI sockets to function.

Close any partner servers running.

  • Open a Windows PowerShell(admin) window
  • Enter these Commands:

    • cd /users
    • python
      • At this point the version of Python is displayed.
    • Exit()

To install Flask type:

  • pip install flask

    • Several messages display
    • At the end, the install status is displayed
    • The message:
      • Successfully install Flask 1.x.x
    • Indicates the flask (add-on) was installed
    • Restart the servers from the server install procedure