Trying to import root into pycharm

Hi everyone,
I’m trying to use into pycharm environment to future developpment.
when i try to run an import ROOT into pycharm I have 2 errors:
ImportError: cannot open shared object file: No such file or directory
Failed to import libcppyy3_7. Please check that ROOT has been built for Python 3.7

but in terminal there is no problem I can execute import ROOT or small root command

_ROOT Version: 6.22
_Platform: Fedora


This looks like PyCharm is not using the same Python version that ROOT was built with. In particular it seems that PyCharm is using Python3.7 but ROOT was not built for that version.

To know which Python version ROOT was built for, you can run:

root-config --python-version
root-config --python3-version
root-config --python2-version

hi @etejedor,
thank you very much, my ROOT is built with python3.7, confirmed by your advise.
I just fixed my issue, my root libraries were not link to pycharm (the path was wrong) I just changed it and it is fixed

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.