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 interpreter does not find compiled libraries #30

Closed
jpdefrutos opened this issue Jan 24, 2022 · 8 comments
Closed

Python interpreter does not find compiled libraries #30

jpdefrutos opened this issue Jan 24, 2022 · 8 comments
Assignees
Labels
bug Something isn't working

Comments

@jpdefrutos
Copy link

jpdefrutos commented Jan 24, 2022

Describe the bug
When executing Liver.py to build the UI, Python interpreter fails in loading the library qSlicerLiverResectionsModuleWidgetsPythonQt on Windows 10 (Liver.py line 178). The library file it is compiled and exists in the solution directory. Other modules are found and loaded correctly.

To Reproduce
Steps to reproduce the behaviour:

  1. Configure the project for VS 2019 v16
  2. Compile in Debug mode for Windows 10 (x64)
  3. Open Slicer, install the Liver extension
  4. Open the liver extension, this will execute Liver.py to build the UI an trigger the error.

Expected behaviour
To load the qSlicerLiverResectionsModuleWidgetsPythonQt library an complete the execution of Liver.py

Screenshots
python_issue

Desktop (please complete the following information):

  • OS: Windows 10 (version 21H1, build 19043.1415)
  • Version: Slicer 4.13.0, Slicer-liver updated to 27.01.2022

Additional context
The libraries are compiled as static (.lib) instead of dynamic (.dll)

@jpdefrutos jpdefrutos added the bug Something isn't working label Jan 24, 2022
@RafaelPalomar RafaelPalomar added this to the Slicer-Liver v1.0 milestone Jan 24, 2022
@RafaelPalomar
Copy link
Collaborator

RafaelPalomar commented Jan 24, 2022

@jpdefrutosSINTEF is this related (https://discourse.slicer.org/t/python-message-failed-to-import-pythonqt-qslicerxxxxmodulewidgets/21575/3?. If so, please make sure that you reply to that post in discourse to add that we are experiencing similar issues (give me a mention in discourse so I have it referenced and can discuss with the developers tomorrow)

@olevs

@RafaelPalomar
Copy link
Collaborator

Information needed @olevs, @jpdefrutosSINTEF :

  • PYTHONPATH

  • LD_LIBRARY_PATH (Linux only)

  • Compnent that works on load

  • Component that it does not work.

  • Testing another extension @jpdefrutosSINTEF

@jpdefrutos
Copy link
Author

jpdefrutos commented Feb 9, 2022

I compiled Slicer with the new Python 3.9, and looks like the bug is gone. The extension is loaded without Python complaining at all, as you can see in blank Python terminal of the attached image.

Slicer was compiled as a release version, as well as the Slicer-liver extension. I got a lot of issues trying to compile the debug version of Slicer on Windows 10.

image

@gatangen
Copy link
Contributor

gatangen commented Feb 9, 2022

Same for me on macOS Javier. A lot of issues in the super build when trying to build Slicer in Debug mode (stops in ITK). Release mode works ok though.

@jpdefrutos
Copy link
Author

Exactly, ITK is the package failing while compiling the debug version... sus

@RafaelPalomar
Copy link
Collaborator

Could you guys open an issue on the official Slicer repo? I think not having Debug is workable, but you might need it further down the road.

@jpdefrutos
Copy link
Author

Quick update: Slicer compiles fine in Debug mode, as well as Slicer-Liver. Though there is an error when creating the resection plane. I will add the information in another issue, to not glut this thread

@RafaelPalomar
Copy link
Collaborator

@ALive-research/alive-software Should we close this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants