Regbot GUI

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(Install packages)
Line 6: Line 6:
 
== Install Python ==
 
== Install Python ==
  
On a windows computer:
+
Install python and the python install program pip.
  
Start the command window by searching for 'cmd' after pressing the windows button.
+
=== Windows ===
  
On a Linux computer, install pip (Python install program)
+
Install Python from Microsoft store (Includes pip).
 +
(Should be python version 3.x)
  
sudo apt install pip
+
=== Mac ===
  
Check the version of Python. In the command window, start python
+
Install Python (version 3.x)
python
+
Maybe it is installed by default
Python 3.6.9 (default, Oct  8 2020, 12:12:24)  
+
(I have no MAC)
on win32
+
Type "help", "copyright", "credits" or "license" for more information.
+
>>> quit()
+
  
This should start python and write the version number. Version must be 3.X.X.
+
=== Linux ===
  
If not installed, then install from Microsoft store, you will probably be directed directly, if not installed.
+
install pip (Python Install Program)
  
=== Install packages ===
+
sudo apt install python3
 +
sudo apt install pip
  
At the CMD prompt, install:
+
== Install Python packages ===
  
> sudo pip install pyqt5
+
=== Windows ===
> sudo pip install pyqtgraph
+
> sudo pip install pyserial
+
  
Can also be installed without the 'sudo' for this user only.
+
Open a terminal window (search for 'cmd' app)
  
If everything goes well, then you are ready to run the GUI from the Python script.
+
At the command prompt install these packages:
  
=== Linux (or Apple)===
+
> pip install pyqt4
 +
> pip install pyserial
 +
> pip install pyqtgraph
 +
> pip install numpy
  
If you run Linux, the above are the packages you need here too.
+
=== MAC ===
 +
 
 +
The same packages are needed.
 +
 
 +
=== Linux ===
 +
 
 +
> sudo pip install pyqt5
 +
> sudo pip install pyqtgraph
 +
> sudo pip install pyserial
 +
> sudo pip install numpy
  
I haven't tested on Apple, but maybe.
 
  
 
== Get REGBOT GUI ==
 
== Get REGBOT GUI ==

Revision as of 10:37, 2 December 2023

Back to Regbot

Back to Robobot


Contents

Install Python

Install python and the python install program pip.

Windows

Install Python from Microsoft store (Includes pip). (Should be python version 3.x)

Mac

Install Python (version 3.x) Maybe it is installed by default (I have no MAC)

Linux

install pip (Python Install Program)

sudo apt install python3
sudo apt install pip

Install Python packages =

Windows

Open a terminal window (search for 'cmd' app)

At the command prompt install these packages:

> pip install pyqt4
> pip install pyserial
> pip install pyqtgraph
> pip install numpy

MAC

The same packages are needed.

Linux

> sudo pip install pyqt5
> sudo pip install pyqtgraph
> sudo pip install pyserial
> sudo pip install numpy


Get REGBOT GUI

Install SVN

The source is on a SVN repository, if not available, then install:

Install TortoiseSVN from https://subversion.apache.org On left menu find "Binary packages" and from here the 'Windows' section

  • Download TortoiseSVN
  • Install, and remember to add 'command line' support.
  • restart a 'cmd' terminal after installation

Get the GUI (SVN repository)

The file-browser may have support for SVN (or it can be added), in this case 'checkout' the regbot_gui on this address

svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui

On Linux (and maybe Apple) install subversion (Linux: sudo apt install subversion)

The checkout with the command

svn checkout svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui

Get the GUI (GIT repository)

A snapshot of the GUI is provided for Teensy version 1535 (14 February 2023) in a git repository

Find the repository and the python files here

https://repos.gbar.dtu.dk/git/jcan/regbot_gui.git

Copy files or clone to your disk

git clone https://repos.gbar.dtu.dk/git/jcan/regbot_gui.git

NB! The SVN repository is regularly updated and this GIT version may be outdated.

Run the GUI

The python version

In the regbot_gui directory, run the regbot.py script.

  • On Linux, this command line should work:
cd regbot_gui
python3 regbot.py
  • On Windows

Find the directory in your file browser (Stifinder)

Start the file 'regbot.py' - maybe create a shortcut on the desktop.

If there are errors about libraries, then check if they are installed (from the list above).

Regbot.exe for Windows

A windows executable is generated (using the instructions below); this is found in a subdirectory called "dist".

> cd Downloads
> cd regbot
> cd regbot_gui
> cd dist
> regbot

Use the browser to locate the file and execute it. It also holds all the needed python-libraries, so it takes a long time to start.

The regbot.exe file is made on a Windows 10 (I don't have anything newer if there are problems; revert to the Python version)

NB! the version from 2022 does not work anymore; it has to have a date from 2023.

Regbot GUI use

See the User interface

Make a windows EXE file

If you installed all the python stuff, you don't need the exe file.

To make a single exe-file without the need to install anything, then it is a bit more complicated (for me at least)

Install python

After installation, start 'cmd' terminal windows as administrator (right-click on 'cmd' and select 'as administrator') to install additional packages using 'pip'.

> pip install pyqt5
> pip install pyqtgraph
> pip install pyserial
> pip install pyinstaller
> exit

Generate EXE file

Open a 'cmd' terminal window as a normal user

Then make the EXE-file from the directory with the REGBOT GUI

> cd Downloads\regbot_gui
> pyinstaller --onefile regbot.py

This takes some time, and the regbot.exe should be found in a 'dist' subdirectory.

Try:

> cd dist
> regbot.exe

PS! tried also with Python 3.9, but regbot.exe failed with the error: "PyQt5.sip not found".

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox