OpenMarine
Python dependency issue? - Printable Version

+- OpenMarine (http://forum.openmarine.net)
+-- Forum: Pypilot (http://forum.openmarine.net/forumdisplay.php?fid=17)
+--- Forum: General discussion (http://forum.openmarine.net/forumdisplay.php?fid=18)
+--- Thread: Python dependency issue? (/showthread.php?tid=2328)



Python dependency issue? - jamos.tan@gmail.com - 02-14-2020

I think I made a few mistakes switching back and forth with Python versions on openplotter 1.2
Needed Python3 for some other applications, and uninstalled / re-installed different versions of Python3.
My understanding was that Python2 was unaffected, but I think they might shared some libraries / dependancies back and forth.
For example, I needed to re-install "serial" and some others for the correct working of some other script than pypilot.
If I am correct, Openplotter 1.2 uses Python2 for Pypilot.

I now have a problem with autopilot motor responses, it works fine for a few seconds but then stops all together.
I am not sure if this is caused due to my fooling around with Python, but it is not a connection problem for sure.

There are no errors in the GUI, everything is synced. It works for a few seconds, the GUI seems to work fine but the motor just stops moving.
Also, the magnetic compass readings seem to come in very slow. Checked this with the SignalK monitor, but there it works fast as it should.

I found in the readme that Pypilot uses these dependancies:

The dependencies can be installed with 'apt install' or sometimes 'pip install"

server dependencies (required): python-gps python-serial libpython-dev python-numpy python-scipy swig
                    (recommended): ujson pyudev
lcdclient dependencies: python-pil
web dependencies: python-flask python-gevent-websocket

client dependencies (viewers control applications)
apt: python-wxgtk3.0 python-opengl
  or python3-wxgtk4.0 python3-opengl
pip: pyglet pywavefront


But before I start re-installing these, I was wondering if this even could be a cause for my symptoms or should look into another direction.

Regards,

Jamos


RE: Python dependency issue? - jamos.tan@gmail.com - 02-14-2020

For anyone else having these troubles, it was indeed the dependencies. Weird thing pypilot didn't give any errors, but I guess different portions of the pypilot script just didn't work and some did.

Update on the documentation, found out which dependancies you have to install with pip, and which ones with apt:

sudo apt install python-gps
sudo apt install python-serial
sudo apt install libpython-dev
sudo apt install python-numpy
sudo apt install python-scipy
sudo apt install swig
sudo pip install ujson
sudo pip install pyudev
sudo apt install python-pil
sudo apt install python-flask
sudo apt install python-gevent-websocket
sudo apt install python-wxgtk3.0
sudo apt install python-opengl
sudo apt install python3-wxgtk4.0
sudo apt install python3-opengl
sudo pip install pyglet
sudo pip install pywavefront