ola
ola copied to clipboard
Ubuntu 22.04.2: OLA olad version: 0.10.9: rdm_test_server.py -> ModuleNotFoundError: No module named 'ola'
Just compiled the latest OLA and having issues with rdm_test_server.py
~/ola-0.10.9$ rdm_test_server.py
Traceback (most recent call last):
File "/usr/local/bin/rdm_test_server.py", line 37, in <module>
from ola.ClientWrapper import ClientWrapper, SelectServer
ModuleNotFoundError: No module named 'ola'
Please advise. Thanks, Arjan
lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
python --version
Python 3.10.6
git clone https://github.com/protocolbuffers/protobuf.git
cd protobuf/
git checkout v3.12.4
./autogen.sh
./configure
make -j 8
sudo make install
wget https://github.com/OpenLightingProject/ola/releases/download/0.10.9/ola-0.10.9.tar.gz
tar xvf ola-0.10.9.tar.gz
cd ola-0.10.9/
./configure --enable-rdm-tests --disable-uart --enable-python-libs --disable-pathport --disable-renard --disable-sandnet --disable-uartdmx --disable-usbdmx --disable-stageprofi --disable-espnet --disable-ftdidmx --disable-gpio --disable-opendmx --disable-openpixelcontrol --disable-shownet --disable-spi --disable-karate --disable-milinst
OLA Version 0.10.9
Prefix: '/usr/local'
Compiler: 'g++ -g -O2 -std=gnu++11 '
Linker: '/usr/bin/ld -m elf_x86_64 '
Python: /usr/bin/python
Python API: yes
Java API: no
Enable HTTP Server: yes
RDM Responder Tests: yes
Ja Rule: no
Enabled Plugins: artnet dummy e131 kinet usbpro
UUCP Lock Directory: /var/lock
Now type 'make [<target>]'
where the optional <target> is:
all - build everything
check - run the tests
doxygen-doc - generate the HTML documentation
lint - run the linters
-------------------------------------------------------
make -j 10
sudo make install
olad --version
OLA olad version: 0.10.9
============================================================================
Testsuite summary for OLA 0.10.9
============================================================================
# TOTAL: 91
# PASS: 83
# SKIP: 0
# XFAIL: 0
# FAIL: 8
# XPASS: 0
# ERROR: 0
============================================================================
See ./test-suite.log
Please report to [email protected]
============================================================================
Same issue with a fresh install Debian 12.
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 12 (bookworm)
Release: 12
Codename: bookworm
apt install cpplint libcppunit-dev uuid-dev pkg-config libncurses5-dev libtool autoconf automake g++ libmicrohttpd-dev libprotobuf-dev libprotoc-dev zlib1g-dev bison flex make libftdi-dev libftdi1 libusb-1.0-0-dev liblo-dev libavahi-client-dev python3-protobuf libprotobuf* protobuf-*
wget https://github.com/OpenLightingProject/ola/releases/download/0.10.9/ola-0.10.9.tar.gz
tar xvf ola-0.10.9.tar.gz
cd ola-0.10.9/
autoreconf -i
./configure --enable-rdm-tests --enable-python-libs --disable-uart --disable-pathport --disable-renard --disable-sandnet --disable-uartdmx --disable-usbdmx --disable-stageprofi --disable-espnet --disable-ftdidmx --disable-gpio --disable-opendmx --disable-openpixelcontrol --disable-shownet --disable-spi --disable-karate --disable-milinst
@debian12:~$ rdm_test_server.py
Traceback (most recent call last):
File "/usr/local/bin/rdm_test_server.py", line 37, in <module>
from ola.ClientWrapper import ClientWrapper, SelectServer
ModuleNotFoundError: No module named 'ola'
Hey @vanvught I am not completely sure (@peternewman can verify), but the 10.9 release may require Python 2. Can you try running each of these:
python --version
python2 --version
python3 --version
which rdm_test_server.py
python $(which rdm_test_server.py)
If you're willing to stick to Debian, there are fresh Debian packages that work with Python3 found here: https://github.com/OpenLightingProject/ola/actions/runs/4853219277 (download the ola-built-debian-bookworm-amd64
artifact). Note that these builds include the RDM tools, but the Debian APT repo builds do not yet include them. For future readers of this issue: this is a link to the build of the most recent commit to the 0.10
branch at time of writing. You can also try from the master
branch: https://github.com/OpenLightingProject/ola/actions/runs/4745715644
Be sure to uninstall your compiled build first before installing the Debian packages. Also be sure to pass all of the relevent files from the downloaded archive to dpkg
or apt
so that it uses the local versions and not a mismatch from the APT repo.
Hi @DaAwesomeP ,
The Python 2 is not available anymore on latest Ubuntu and Debian.
Ubuntu 22.04.2
@nuc-i7:~$ python --version
Python 3.10.6
@nuc-i7:~$ python2 --version
Command 'python2' not found, but can be installed with:
sudo apt install python2
@nuc-i7:~$ python3 --version
Python 3.10.6
@nuc-i7:~$ which rdm_test_server.py
/usr/local/bin/rdm_test_server.py
@nuc-i7:~$ python $(which rdm_test_server.py)
Traceback (most recent call last):
File "/usr/local/bin/rdm_test_server.py", line 37, in <module>
from ola.ClientWrapper import ClientWrapper, SelectServer
ModuleNotFoundError: No module named 'ola'
Debian12
@debian12:~$ python --version
Python 3.11.2
@debian12:~$ python2 --version
-bash: python2: command not found
@debian12:~$ python3 --version
Python 3.11.2
@debian12:~$ which rdm_test_server.py
/usr/local/bin/rdm_test_server.py
@debian12:~$ python $(which rdm_test_server.py)
Traceback (most recent call last):
File "/usr/local/bin/rdm_test_server.py", line 37, in <module>
from ola.ClientWrapper import ClientWrapper, SelectServer
ModuleNotFoundError: No module named 'ola'
The Python 2 is not available anymore on latest Ubuntu and Debian.
Yes, this is what I suspected. It seems that 10.9 does contain the Python 3 fixes but maybe it isn't installing properly with make install
.
Can you try the Debian packages that I linked to? While they don't solve the issue you found, they should work because they install differently. These are official builds from this repo.
@DaAwesomeP Thank you Perry!
On Debian 12 with the *.deb files from the link above:
@debian12:~$ rdm_test_server.py
Checking olad status
Running RDM Tests Server on http://127.0.0.1:9099
192.168.2.156 - - [12/Jun/2023 23:10:53] "GET / HTTP/1.1" 301 0
192.168.2.156 - - [12/Jun/2023 23:10:53] "GET / HTTP/1.1" 301 0
192.168.2.156 - - [12/Jun/2023 23:10:53] "GET /static/rdmtests.html HTTP/1.1" 200 15892
192.168.2.156 - - [12/Jun/2023 23:10:54] "GET /static/rdm_tests.js HTTP/1.1" 200 29801
192.168.2.156 - - [12/Jun/2023 23:10:54] "GET /static/ui.multiselect.js HTTP/1.1" 200 11024
192.168.2.156 - - [12/Jun/2023 23:10:54] "GET /static/jquery-ui-1.8.21.custom.min.js HTTP/1.1" 200 206923
192.168.2.156 - - [12/Jun/2023 23:10:54] "GET /static/jquery-1.7.2.min.js HTTP/1.1" 200 94840
192.168.2.156 - - [12/Jun/2023 23:10:54] "GET /static/ui.multiselect.css HTTP/1.1" 200 1886
192.168.2.156 - - [12/Jun/2023 23:10:54] "GET /static/jquery-ui-1.8.21.custom.css HTTP/1.1" 200 33311
192.168.2.156 - - [12/Jun/2023 23:10:54] "GET /static/images/logo.png HTTP/1.1" 200 1579
192.168.2.156 - - [12/Jun/2023 23:10:54] "GET /static/images/discovery.png HTTP/1.1" 200 860
192.168.2.156 - - [12/Jun/2023 23:10:54] "GET /static/images/ui-bg_inset-hard_75_999999_1x100.png HTTP/1.1" 200 114
192.168.2.156 - - [12/Jun/2023 23:10:54] "GET /static/images/external.png HTTP/1.1" 200 165
192.168.2.156 - - [12/Jun/2023 23:10:54] "GET /GetTestDefs?c=0&_=1686604254258 HTTP/1.1" 200 11792
192.168.2.156 - - [12/Jun/2023 23:10:54] "GET /GetUnivInfo?_=1686604254258 HTTP/1.1" 200 81
@vanvught Amazing! I'm glad that workaround worked for you!
We should leave this open because there seems to be an issue with how make install
installs the ola
dependency for Python 3.
any news on how to fix this manually or in the install?
Im on a Rpi4, local build of ola
$ git describe
0.10.2-3728-g653449120
$ uname -a
Linux ola 6.1.0-rpi8-rpi-v8 #1 SMP PREEMPT Debian 1:6.1.73-1+rpt1 (2024-01-25) aarch64 GNU/Linux
To make the dependencies install i used this command, note that some versions are bumped:
$ sudo apt-get install \
libcppunit-dev \
libcppunit-1.15-0 \
uuid-dev \
pkg-config \
libncurses5-dev \
libtool \
autoconf \
automake g++ \
libmicrohttpd-dev \
libmicrohttpd12 \
protobuf-compiler \
libprotobuf-lite32 \
python3-protobuf \
libprotobuf-dev \
libprotoc-dev \
zlib1g-dev \
bison flex \
make \
libftdi-dev \
libftdi1 \
libusb-1.0-0-dev \
liblo-dev \
libavahi-client-dev \
python3-numpy
Edit:
I managed to workaround the install issue wich I guess confirms that it is just(tm) the install step that misses something:
PYTHONPATH=/home/$USER/ola/python rdm_responder_test.py <uid>
I do get some tracebacks running the test but that is probably another issue