Hi Hugues, welcome to the forums!
It looks like you’re one of the first people to use this module with python3 rather than Python 2.7. It was not originally written for python3, but I have found a workaround to get it running.
What it boils down to is that python3 handles relative imports differently than 2.7 so we’ll need to change line 1 of
init.py to explicitly say where to find
Here’s my workaround:
Download a copy of the same optommp repository that pip uses:
Unzip the master file:
Delete the zip file (optional, but you won’t need it again):
Navigate into the unzipped folder (this is also where I create and run my python3 script):
Open the init file with your text editor of choice:
Modify ONLY line 1, replacing “
import O22SIOUT” with:
from optommp import O22SIOUT
Save the file. Now, in the
optommp-master/ folder, you can create and run your python3 scripts using this modified module. There may be ways to get around the pathing, but the main thing is that the script should be in the same folder as the
Then what should happen is that when you run the script here, instead of using the module you installed with pip at
usr/lib/python3.4/site-packages/, python3 should use this modified version from wherever you unzipped the repo (in my case that’s just
Please let me know if that does or doesn’t get you up and running, and again, welcome to the forums!