Regbot GUI: Difference between revisions

From Rsewiki
 
(44 intermediate revisions by the same user not shown)
Line 1: Line 1:
Back to [[Regbot]]
Back to [[Regbot]]
NB! this page is for installing python3 version of the Regbot GUI.


== Install Python ==
== Install Python ==


Start the command window  by searching for 'cmd' after pressing Start.
Install python and the python install program pip.


In the command window type
=== Windows ===
python
Python 3.6.9 (default, Oct  8 2020, 12:12:24)
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.
Install Python from Microsoft store (Includes pip).
(Should be python version 3.x)


If not installed, then install from Microsoft store, you will probably be directed directly, if not installed.
=== Mac ===


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


At the CMD prompt install
=== Linux ===


> pip install pyqt5
install pip (Python Install Program)
> pip install pyqtgraph
> pip install pyserial


If everything goes well, then you are ready to run the GUI from the Python script.
sudo apt install python3
sudo apt install pip


==== Linux (or Apple)====
To be consistent, either use a virtual environment and install with pip, or
install packages with apt:


If you run Linux, the above are the packages you need here too.
sudo apt install python3-pyqt5
sudo apt install python3-serial
sudo apt install python3-pyqtgraph


I haven't tested on Apple, but maybe.
== Install Python packages ==


== Get REGBOT GUI ==
=== Windows ===


===Install SVN=== 
Open a terminal window (search for 'cmd' app)


The source is on a SVN repository, if not available, then install:
At the command prompt install these packages:


Install TortoiseSVN from https://subversion.apache.org
> pip install pyqt5
On left menu find "Binary packages" and from here the 'Windows' section
> pip install pyserial
> pip install pyqtgraph
> pip install numpy


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


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


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


=== Get REGBOT GUI python script using the command-line ===
> pip install pyqt5
> pip install pyqtgraph
> pip install pyserial
> pip install numpy


At the windows command terminal, do a checkout.
== Get REGBOT GUI ==
Change to the Downloads folder (makes it easier to find (under Overførsler på dansk))
 
> cd Downloads
> svn checkout svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui
 
Find the directory in your file browser (Stifinder)
 
Start the file 'regbot.py' - maybe create a shortcut on the desktop.
 
=== Windows regbot.exe file ===
 
(not tested for the new GUI - below this line)


The Python version is packed as a single regbot.exe file, and is in the SVN directory downloaded above
The REGBOT GUI is just a set of python files


> cd Downloads/regbotgui/dist
There are two options
> regbot.exe
* Get the python files from a zip-file (available in Learn)
* Get the newest version from repository (SVN)


Or, get the client software (regbot.exe) from relevant course resource https://Learn.inside.dtu.dk (as a zip file), unpack and use.
=== From zip file ===


A version is available here too:
Unzip the Python files (many files (23), so keep them in a clean directory).
http://aut.elektro.dtu.dk/regbot/regbot-gui/regbot-gui.exe  (might be an old version, see the "about" box)


=== Regbot GUI use===
=== From SVN repository ===


See the [[User interface]]
Make sure your PC has SVN (Apache subversion) support.


== Make a windows EXE file ==
===== Windows =====


If you installed all the python stuff, then you don't need the exe file.
Install e.g. SilkSVN (https://sliksvn.com/download/), this is a command-line interface, but there are other packages too.


To make a single exe-file without need to install anything, then it is a bit more complicated (for me at least)
Start a 'cmd' terminal after installation.


The Microsoft version failed in creating the exe-file
===== Linux (and MAC) =====


===Install python===
sudo apt install subversion


* Remove already installed python
==== Get the GUI Python files ====


* Install python (tested with version 3.8) from https://www.python.org/downloads/ - select 'all users' in install options and also select 'add to path'.
Open a terminal window, change the directory, to where you want to install, e.g. called 'svn'


After installation, start 'cmd' terminal windows as administrator (rightclick on 'cmd' select 'as administrator'), to install additional packages using 'pip'. (may work as user - i Haven't tested).
  mkdir svn
 
  cd svn
  > pip install pyqt5
  svn checkout svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui
  > pip install pyqtgraph
  cd regbot_gui
  > pip install pyserial
> pip install pyinstaller
  > exit


Open a 'cmd' terminal window as normal user
There should be several Python files, including 'regbot.py'.


Then make the EXE-file from the directory with the REGBOT GUI
== Start the Regbot GUI ==


> cd Downloads\regbotgui
Go to the directory, where the Python files are placed.
> pyinstaller --onefile regbot.py


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


Try:
From a terminal
> cd dist
> regbot.exe


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

Latest revision as of 11:24, 29 October 2025

Back to Regbot

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

To be consistent, either use a virtual environment and install with pip, or install packages with apt:

sudo apt install python3-pyqt5
sudo apt install python3-serial
sudo apt install python3-pyqtgraph

Install Python packages

Windows

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

At the command prompt install these packages:

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

MAC

The same packages are needed.

Linux

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

Get REGBOT GUI

The REGBOT GUI is just a set of python files

There are two options

  • Get the python files from a zip-file (available in Learn)
  • Get the newest version from repository (SVN)

From zip file

Unzip the Python files (many files (23), so keep them in a clean directory).

From SVN repository

Make sure your PC has SVN (Apache subversion) support.

Windows

Install e.g. SilkSVN (https://sliksvn.com/download/), this is a command-line interface, but there are other packages too.

Start a 'cmd' terminal after installation.

Linux (and MAC)

sudo apt install subversion

Get the GUI Python files

Open a terminal window, change the directory, to where you want to install, e.g. called 'svn'

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

There should be several Python files, including 'regbot.py'.

Start the Regbot GUI

Go to the directory, where the Python files are placed.

  • Execute the 'regbot.py' file.

From a terminal

cd regbot_gui
python3 regbot.py