Skip to content
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

Python-bindings with Python2 #88

Closed
alicezanella opened this issue Mar 3, 2021 · 4 comments
Closed

Python-bindings with Python2 #88

alicezanella opened this issue Mar 3, 2021 · 4 comments
Assignees
Labels
wontfix This will not be worked on

Comments

@alicezanella
Copy link

alicezanella commented Mar 3, 2021

Hello,

I was wondering if the preCICE python bindings could work with python2.
I'm working with a mbdyn adapter and I cannot work with python3, but if I write "import precice" and run the script with python it gives "No module named precice".

Thank you!

Alice

@BenjaminRodenberg BenjaminRodenberg added the wontfix This will not be worked on label Mar 4, 2021
@BenjaminRodenberg BenjaminRodenberg self-assigned this Mar 4, 2021
@BenjaminRodenberg
Copy link
Member

BenjaminRodenberg commented Mar 4, 2021

Hi Alice,

first of all the bad news: we do not and (as much as I can say today) will not support python2 with the python bindings. The main reason for this is that python2 is officially not supported anymore since 2020. See https://python3statement.org/ or https://mail.python.org/archives/list/python-announce-list@python.org/thread/OFCIETIXLX34X7FVK5B5WPZH22HXV342/.

Our mbdyn adapter is currently quite outdated and needs maintainment (see precice/mbdyn-adapter#2 and precice/mbdyn-adapter#3). The long-range plan is to get it working (again) with the most recent preCICE and python version. We would be very very grateful for any contribution in this direction and will, of course, provide as much help as we can.

You say that you "cannot work with python3". What's the exact reason? If it is the mbdyn adapter, see above. If it is mbdyn itself: I've never used mbdyn, but if mbdyn does not support python3 (yet), it might already help opening an issue and pointing to the guidelines. I could not find any related issue after a quick search, but like I said: I'm definitely no mbdyn expert.

I hope that this helps. Will close this issue now, since we will not fix it. You can still comment below, if you want.

Benjamin

@precice-bot
Copy link

This issue has been mentioned on preCICE Forum on Discourse. There might be relevant details there:

https://precice.discourse.group/t/python-bindings-error-solver-dummy/502/7

@alicezanella
Copy link
Author

Hi @BenjaminRodenberg

I finally found what the problem was. It was entirely due to my MBDyn installation.
I had installeld the latest version (1.7.3) which works perfectly with python2, but fails to work with python3 (in the configuration it couldn't see the numpy headers).
So I tried the develop branch of MBDyn git folder and it did the trick!
I will inform MBDyn developers of this issue.

Thank you for your help!

@BenjaminRodenberg
Copy link
Member

Thanks for the feedback @alicezanella! Glad to hear everything seems to work. Did you already see the discussion in precice/mbdyn-adapter#3 ? There seems to be a C++-based version of the adapter around. I think the information that the python-based version is working for you is very important.

By the way: If you have any test cases using the adapter that you could contribute to https://github.com/precice/tutorials this would be great. For us as MBdyn non-experts it's always difficult to come up with cases. Anything that illustrates correct usage and helps to verify the functionality helps.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
wontfix This will not be worked on
Projects
None yet
Development

No branches or pull requests

3 participants