CATIA-Systems / FMPy

Simulate Functional Mockup Units (FMUs) in Python
Other
410 stars 117 forks source link

Installation on Rpi wth Python 3.11? #676

Open StepanOzana opened 2 weeks ago

StepanOzana commented 2 weeks ago

Hello, have anyone tried installation on Rpi3 or Rpi4? I use them with Python 3.11.2 and Bullseye lite. Installation via pip just fails.

t-sommer commented 1 week ago

An you share the error message?

StepanOzana commented 1 week ago

I logged installation process in this file:

error_log.txt

t-sommer commented 1 week ago

Can you try to run just python -m pip install fmpy (w/o [complete])?

StepanOzana commented 1 week ago

sure, here is the result: error_log2.txt

StepanOzana commented 1 week ago

It seems like PyQt5 / PyQtWebEngine are the issues. Is there a way how to install it without them, at least as a temporary workaround? I don't need gui.

t-sommer commented 1 week ago

You could try to hack the platform detection in __init__.py line 57 and add your processor:

if machine().lower() in {'aarch32', 'armv7l'}:
    platform += '32'
    architecture = 'aarch32'
elif machine().lower() in {'aarch64', 'arm64'}:
    platform += '64'
    architecture = 'aarch64'
elif machine().lower() in {'amd64', 'i386', 'i686', 'x86', 'x86_64', 'x86pc'}:
    if sys.maxsize > 2 ** 32:
        platform += '64'
        architecture = 'x86_64'
    else:
        platform += '32'
        architecture = 'x86'
else:
    raise Exception(f"Unsupported architecture: {machine()}")
StepanOzana commented 1 week ago

Here is what I get after modifying init.py: Failed to add logger proxy function. /usr/local/lib/python3.9/dist-packages/fmpy/logging/linux32/logging.so: cannot open shared object file: No such file or directory

t-sommer commented 4 days ago

You should still be able to simulate FMUs. The logging.so is only needed to process variadic arguments in log calls.