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

Wheel needed to be installed inside Slicer #146

Open
BishopWolf opened this issue Apr 7, 2023 · 8 comments
Open

Wheel needed to be installed inside Slicer #146

BishopWolf opened this issue Apr 7, 2023 · 8 comments

Comments

@BishopWolf
Copy link

BishopWolf commented Apr 7, 2023

I need Gate inside Slicer, therefore I run a simple pip installation there, and it failed as it required a whl (python wheel): see this thread. Slicer has a bundled python 3.9, so the version is OK.

@tbaudier
Copy link
Contributor

tbaudier commented Apr 7, 2023

According to your thread, your are using windows system. For the moment, the wheel is only available for Mac and Linux. For Windows, it's on going (see #115)

@BishopWolf
Copy link
Author

I am trying now in Linux. The wheels install, but they do not work :

>>> import opengate as gate
opengate_core is not detected. Be sure to execute these lines before to run python:
export LD_LIBRARY_PATH=/home/alex/Programas/Slicer-5.3.0-2023-03-16-linux-amd64/bin/../lib/Python/lib/python3.9/site-packages/opengate_core.libs:${LD_LIBRARY_PATH}
export LD_PRELOAD=/home/alex/Programas/Slicer-5.3.0-2023-03-16-linux-amd64/bin/../lib/Python/lib/python3.9/site-packages/opengate_core.libs/libG4processes-9232ba54.so:/home/alex/Programas/Slicer-5.3.0-2023-03-16-linux-amd64/bin/../lib/Python/lib/python3.9/site-packages/opengate_core.libs/libG4geometry-fbd76286.so:${LD_PRELOAD}

Is there a workaround?

@nkrah
Copy link
Collaborator

nkrah commented Aug 7, 2023

Hey @BishopWolf,
since your post is from April, could you be so kind and check if opengate now installs and works correctly for you? The code has evolved quite a lot since then ...
Thanks

@BishopWolf
Copy link
Author

BishopWolf commented Aug 8, 2023

Hey @BishopWolf, since your post is from April, could you be so kind and check if opengate now installs and works correctly for you? The code has evolved quite a lot since then ... Thanks

>>> from opengate import gate
opengate_core is not detected. Be sure to execute these lines before to run python:
export LD_LIBRARY_PATH=/Data/Programas/Slicer-5.3.0-2023-07-05-linux-amd64/bin/../lib/Python/lib/python3.9/site-packages/opengate_core.libs:${LD_LIBRARY_PATH}
export LD_PRELOAD=/Data/Programas/Slicer-5.3.0-2023-07-05-linux-amd64/bin/../lib/Python/lib/python3.9/site-packages/opengate_core.libs/libG4processes-92d9f07e.so:/Data/Programas/Slicer-5.3.0-2023-07-05-linux-amd64/bin/../lib/Python/lib/python3.9/site-packages/opengate_core.libs/libG4geometry-0c687114.so:${LD_PRELOAD}
>>> 

It's the same error, there is no way to start gate from within slicer. Adding the suggested lines before launching Slicer yields

$ export LD_LIBRARY_PATH=/Data/Programas/Slicer-5.3.0-2023-07-05-linux-amd64/bin/../lib/Python/lib/python3.9/site-packages/opengate_core.libs:${LD_LIBRARY_PATH}
export LD_PRELOAD=/Data/Programas/Slicer-5.3.0-2023-07-05-linux-amd64/bin/../lib/Python/lib/python3.9/site-packages/opengate_core.libs/libG4processes-92d9f07e.so:/Data/Programas/Slicer-5.3.0-2023-07-05-linux-amd64/bin/../lib/Python/lib/python3.9/site-packages/opengate_core.libs/libG4geometry-0c687114.so:${LD_PRELOAD}

-------- EEEE ------- G4Exception-START -------- EEEE -------

*** ExceptionHandler is not defined ***
*** G4Exception : HadDevPara_004
      issued by : G4HadronicDeveloperParameters
Parameter BERT_FERMI_SCALE is already defined.
*** Fatal Exception ***
-------- EEEE ------- G4Exception-END -------- EEEE -------


*** G4Exception: Aborting execution ***
bash: --------: command not found
bash: 14.6: command not found
bash: 14.6: command not found
bash: eval: line 11: syntax error near unexpected token `('
bash: eval: line 11: `      issued by : G4CrossSectionFactoryRegistry::Register(...)'

-------- EEEE ------- G4Exception-START -------- EEEE -------

*** ExceptionHandler is not defined ***
*** G4Exception : HadDevPara_004
      issued by : G4HadronicDeveloperParameters
Parameter BERT_FERMI_SCALE is already defined.
*** Fatal Exception ***
-------- EEEE ------- G4Exception-END -------- EEEE -------


*** G4Exception: Aborting execution ***

@nkrah
Copy link
Collaborator

nkrah commented Aug 9, 2023

Thanks for reporting back. I quickly looked at the thread on the Slicer discourse. From what I understand, slicer provides a proper wrapper of pip install, correct? Thus, the issue is probably related to where and how Slicer installs the python modules, so that opengate does not find them when executed within Slicer.

Personally, I do not use Slicer, but it seems a good idea to be able to run gate from Slicer, for dose calculation in your case, correct? The possibility to interface GATE with other software was one of the motivations to develop a new python-based version of GATE.

If you are interested, we could schedule a video meeting and look at the issue a bit more in detail together. What do you think?

@BishopWolf
Copy link
Author

BishopWolf commented Aug 11, 2023

Dear @nkrah, it would be nice to have this meeting. I will be available next Tuesday, Paris Time zone.

Send me your emails to include you in a zoom/teams meeting (add also thomas @tbaudier )

@BishopWolf
Copy link
Author

@nkrah @tbaudier , any news on this?

@dsarrut
Copy link
Contributor

dsarrut commented Sep 6, 2023

yes sure, please could you wait for few weeks, we are still working on this and this is not consolidated yet. We can plan something around end of Octobre, thanks ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants