-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Binaries on PyPI only support Python 3.9 #128
Comments
It should work in Python 3.6 <= as the ABI is kept binary compatible. I for one, use Python 3.7. |
Thanks for the reply! On Ubuntu 20.04 I ran into trouble with the system python (3.8) when trying to use the FMU in OMEdit. I can try to reproduce the issue on my system and post the error here. |
I generate the example In both cases I ran
I will describe the behavior below. PyPI
This Repo (github)
|
Yeah, I can replicate through WSL (Ubuntu 18.04). |
This may be the reason why it work on different Python versions on Windows: if (WIN32)
set(Python3_LIBRARIES ${Python3_LIBRARY_DIRS}/python3.lib)
endif () I dunno if something similar is possible to do for Linux. |
I think
I got stuck at the point that |
I ran the locate command on my Ubuntu installation and there is no |
Ok, so now I'm a little bit confused... You see, the CI compiles the binaries once. Presumably using 3.9.. |
Do you know whether on the CI instance executing the tests I once also was in the situation that both python 3.8 and 3.9 were installed on my system and everything worked nicely with python 3.8, if I remember correctly. |
Yeah, the virtual environment has:
|
I could also reproduce this issue on ubuntu 20.04 using a miniconda with a python version 3.8: Following output is produced:
After creating a new conda environment 3.9:
The problem persist despite using the correct python version. However, if we add python 3.9 to our the library path this issue can be resolved export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:ANACONDA_PATH/envs/py39/lib/ Why is python 3.9 linked by default on ubuntu? |
As far as I can tell, there is no way for PythonFMU to support more than one python distribution on Ubuntu as it links to a specific version of Python. Windows does not.. I guess Python 3.9 is the version used by default on GitHub Actions (Python 3.x) so that is the one that is linked. The only way to make it work with a different Python on Linux is to manually build the library and replace the .so. |
The python interpreter gets found by: After adding following line
the activated interpreter is used ubuntu 1804 only comes with cmake 3.10 upgrading to ubuntu 2004 should change the cmake version to 3.16 |
I also have this problem, how to solve this problem finally, do you need to upgrade python version to 3.9? I'm currently using version of Python =3.6.9 |
To resolve the issue locally, you can
|
[FMI native bridge] Fatal: Failed to load library 'C:\Users******\AppData\Local\Temp\fmi4j_dnn3437415721011360530\binaries\win64/dnn.dll', error: 126 Fmu generated under Windows, but in Java environment to call down my compiled FMU, the above error, is the compilation binary file error? |
@2018-Summer Windows is not related to this issue, please keep the posts relevant. But that error is stemming from a missing dll on PATH. |
…663c102e24fd521f7 seems to be a workable fix to NTNU-IHB#128
this should be fixed now with #187 |
@markaren I dont see new binaries on pypi, why did you close this ? |
You are right, this issue is specifically about pypi |
do you plan on tagging a new version ? |
https://pypi.org/project/pythonfmu/ (v0.6.3) |
great, thanks! |
I guess it can be closed now |
I installed pythonfmu from PyPI via
pip3 install --user python3fmu
. However, when I tried to use the generated FMU OMEdit crashed. After some investigations I found out that the binaries provided on PyPI are only compatible with Python 3.9 (as far as I understand). According to the documentation pythonfmu should work with any python3 distribution, if I don't understand it wrong.Why only python 3.9?
I downloaded
pythonfmu-0.6.2-py3-none-any.whl
from here, unpacked it and ranldd
onlibpythonfmu-export.so
:Further details
I assume that this is due to the way how the binaries of pythonfmu are generated in this action.
I'm not sure whether this is something that one can change easily. Distributing binaries for all python platforms is probably out of scope.
I finally fixed this issue by cloning this repository, building the binaries myself via
cmake
&make
inpythonfmu/pythonfmu-export
and installing pythonfmu viasetup.py
.The text was updated successfully, but these errors were encountered: