WebControl Open Beta

I found a way to slim down the python install for Windows 10 to run WebControl. By using the Conda package manager for Python to install the requirements, you will not have to do separate downloads from Microsoft for the VisualStudio C++ libraries. the compiled modules can be downloaded directly from the Anaconda servers. You could install Anaconda Python to do this, but it will install a lot of extras (Juypter Notebook, Spyder IDE, etc.), which maybe of interest if you code or are in the science or math fields. I chose to just download the Conda package manager with Python.

Download Miniconda Python 3.7, from here
https://conda.io/en/latest/miniconda.html
Install it and you should now have an Anaconda Prompt in your Windows start menu. After I had all the dependencies downloaded and WebControl working, I made a copy of my working environment. The environment.yml (459 Bytes) can be copied to your unzipped WebControl folder or cut and paste the text below into text editor and save it. The YAML file is used to clone the python build on your PC.

name: webcontrol
channels:
  - defaults
dependencies:
  - Python=3.7.2
  - Click=7.0
  - Flask=1.0.2
  - Flask-SocketIO=3.0.2
  - gevent=1.3.7
  - greenlet=0.4.15
  - itsdangerous=0.24
  - Jinja2=2.10
  - MarkupSafe=1.0
  - numpy=1.15.2
  - pyserial=3.4
  - python-engineio=2.3.2
  - python-socketio=2.0.0
  - six=1.11.0
  - Werkzeug=0.14.1
  - pip:
    - flask-mobility==0.1.1
    - opencv-python==3.4.3.18
    - schedule==0.5.0

Once you’ve copied the environment.yml file to the WebControl-master directory, launch the Anaconda Prompt from the Windows start. This will open up a command prompt for Python. CD to the WebControl-master directory and run the following commands to create and activate the python environment.

conda env create -f environment.yml
conda activate webcontrol

You should now be in the virtual python environment with all the dependencies.
In the 64-bit Anaconda for Windows I had trouble with 3 packages not installing from PIP inside the environment.yml file that need to be installed manually as shown below.

pip install flask-mobility==0.1.1
pip install opencv-python==3.4.3.18
pip install schedule==0.5.0

Note - With the 32-bit Miniconda installation in Windows 10 and in Linux I did not have this problem. All package dependencies were resolved when running conda env create.

With all dependencies taken care of just start up WebControl with

python main.py

and open your browser to http://localhost:5000/

Is this easier than installing VisualStudio C++ libraries and python.org on a Windows 10 PC?
Will this be helpful to someone who can’t meet the graphics requirements to run kivy and GroundControl?

3 Likes