Regbot GUI

From Rsewiki
(Difference between revisions)
Jump to: navigation, search
(Install Python)
 
(30 intermediate revisions by one user not shown)
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 ===
  
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 ==
  
> pip install pyqt5
+
=== Windows ===
> pip install pyqtgraph
+
> pip install pyserial
+
  
If everything goes well, then you are ready to run the GUI from the Python script.
+
Open a terminal window (search for 'cmd' app)
  
==== Linux (or Apple)====
+
At the command prompt install these packages:
  
If you run Linux, the above are the packages you need here too.
+
> pip install pyqt4
 +
> pip install pyserial
 +
> pip install pyqtgraph
 +
> pip install numpy
  
I haven't tested on Apple, but maybe.
+
=== MAC ===
  
== Get REGBOT GUI ==
+
The same packages are needed.
  
===Install SVN===
+
=== Linux ===
  
The source is on a SVN repository, if not available, then install:
+
> pip install pyqt5
 +
> pip install pyqtgraph
 +
> pip install pyserial
 +
> pip install numpy
  
Install TortoiseSVN from https://subversion.apache.org
+
== Get REGBOT GUI ==
On left menu find "Binary packages" and from here the 'Windows' section
+
  
* Download TortoiseSVN
+
The REGBOT GUI is just a set of python files
* Install, and remember to add 'command line' support.
+
* restart a 'cmd' terminal after installation
+
  
=== get the GUI ===
+
There are two options
 +
* Get the python files from a zip-file (available in Learn)
 +
* Get the newest version from repository (SVN)
  
The file-browser may have support for SVN (or it can be added), in this case 'checkout' the regbot_gui on this address
+
=== From zip file ===
  
svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui
+
Unzip the Python files (many files (23), so keep them in a clean directory).
  
=== Get REGBOT GUI python script using the command-line ===
+
=== From SVN repository ===
  
At the windows command terminal, do a checkout.
+
Make sure your PC has SVN (Apache subversion) support.
Change to the Downloads folder (makes it easier to find (under Overførsler på dansk))
+
  
> cd Downloads
+
===== Windows =====
> svn checkout svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui
+
  
Find the directory in your file browser (Stifinder)
+
Install e.g. SilkSVN (https://sliksvn.com/download/), this is a command-line interface, but there are other packages too.
  
Start the file 'regbot.py' - maybe create a shortcut on the desktop.
+
Start a 'cmd' terminal after installation.
  
=== Regbot GUI use===
+
===== Linux (and MAC) =====
  
See the [[User interface]]
+
sudo apt install subversion
  
== Use regbot.exe for Windows ==
+
==== Get the GUI Python files ====
  
A windows executable is generated (using the instructions below); this is found in a subdirectory called "dist".
+
Open a terminal window, change the directory, to where you want to install, e.g. called 'svn'
  
  > cd Downloads
+
  mkdir svn
  > cd regbot
+
  cd svn
  > cd regbot_gui
+
  svn checkout svn://repos.gbar.dtu.dk/jcan/regbot/regbot_gui
> cd dist
+
  cd regbot_gui
> regbot
+
 
+
 
+
 
+
Use the browser to locate the file and execute it.
+
As it also holds all the needed python-libraries, it takes a long time to start.
+
 
+
NB! the version from 2022 does not work anymore, it has to have a date from 2023.
+
 
+
== Make a windows EXE file ==
+
 
+
If you installed all the python stuff, then you don't need the exe file.
+
 
+
To make a single exe-file without need to install anything, then it is a bit more complicated (for me at least)
+
 
+
The Microsoft version failed in creating the exe-file
+
 
+
===Install python===
+
 
+
* Remove already installed python
+
 
+
* 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'.
+
 
+
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).
+
 
+
  > pip install pyqt5
+
> pip install pyqtgraph
+
> 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 15:02, 7 December 2023

Back to Regbot

Back to Robobot


Contents

[edit] Install Python

Install python and the python install program pip.

[edit] Windows

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

[edit] Mac

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

[edit] Linux

install pip (Python Install Program)

sudo apt install python3
sudo apt install pip

[edit] Install Python packages

[edit] 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

[edit] MAC

The same packages are needed.

[edit] Linux

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

[edit] 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)

[edit] From zip file

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

[edit] From SVN repository

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

[edit] 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.

[edit] Linux (and MAC)

sudo apt install subversion

[edit] 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'.

[edit] 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
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox