[Rtk-users] ITK-RTK python install issues

Bleeker, M. (Margot) m.bleeker at amsterdamumc.nl
Tue Nov 24 10:21:45 EST 2020


Thanks! Your suggestion worked!

Margot

From: Nils Krah <nils.krah at creatis.insa-lyon.fr>
Sent: dinsdag 24 november 2020 15:51
To: Bleeker, M. (Margot) <m.bleeker at amsterdamumc.nl>
Cc: rtk-users at public.kitware.com
Subject: Re: [Rtk-users] ITK-RTK python install issues

I had a similar issue some days ago and Simon suggested to download a recently built wheel from github:
​https://github.com/SimonRit/RTK/actions/runs/341384403<https://eur04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FSimonRit%2FRTK%2Factions%2Fruns%2F341384403&data=04%7C01%7Cm.bleeker%40amsterdamumc.nl%7C2f84671ee1b94590ddb408d8908863ff%7C68dfab1a11bb4cc6beb528d756984fb6%7C0%7C0%7C637418262748788557%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=%2Bxn3aVBWVSJWK0unA5DEejKJ8vY%2F8RGQmj%2BWleIJ6hs%3D&reserved=0>
​(you need to be logged in to github)
​
download the appropriate file and run
​pip install <FILENAME>​
​locally.
​Or
​python -m pip install <FILENAME>
​
​Solved the issue for me on MacOS.
​
​Simon might correct me if I am writing bogus here.
​
Cheers
​Nils
​
​
On Nov 24 2020, at 3:33 pm, Bleeker, M. (Margot) <m.bleeker at amsterdamumc.nl<mailto:m.bleeker at amsterdamumc.nl>> wrote:
Hello,

I am new to ITK and RTK and I’m trying to use the itk-rtk python package. I set up a new environment with python 3.7 (with Conda) on Windows 10 and ran:

Pip install itk-rtk

I could import both packages, but I got the following error when I ran the example FirstReconstruction.py:

‘’
Traceback (most recent call last):
  File "D:\Program files\RTK-master\examples\FirstReconstruction\FirstReconstruction.py", line 14, in <module>
    geometry = rtk.ThreeDCircularProjectionGeometry.New()
  File "D:\Python\envs\CBreconstruct\lib\site-packages\itkLazy.py", line 52, in __getattribute__
    itkBase.LoadModule(module, namespace)
  File "D:\Python\envs\CBreconstruct\lib\site-packages\itkBase.py", line 99, in LoadModule
    module = loader.load(swig_module_name)
  File "D:\Python\envs\CBreconstruct\lib\site-packages\itkBase.py", line 220, in load
    module.__loader__.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 728, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "D:\Python\envs\CBreconstruct\lib\site-packages\itk\RTKPython.py", line 119, in <module>
    from itkFixedArrayRTKPython import *
  File "D:\Python\envs\CBreconstruct\lib\site-packages\itk\Configuration\..\itkFixedArrayRTKPython.py", line 106, in <module>
    import pyBasePython
  File "D:\Python\envs\CBreconstruct\lib\site-packages\itk\Configuration\..\pyBasePython.py", line 8, in <module>
    from . import _ITKPyBasePython
ImportError: attempted relative import with no known parent package
‘’

Does anyone know how to solve this issue?

Thanks

Sincerely,
Margot Bleeker


[cid:image001.png at 01D6C27D.E60E84A0]

Margot Bleeker, MSc.|  PhD student (OiO)
Afdeling Radiotherapie
Locatie AMC | Z1-217 | Meibergdreef 9, 1105 AZ Amsterdam
T: +31 20 566 7974|  E: m.bleeker at amsterdamumc.nl<mailto:m.bleeker at amsterdamumc.nl>
www.amsterdamumc.nl<http://www.amsterdamumc.nl/>  |  www.vumc.nl<http://www.vumc.nl/> / www.amc.nl<http://www.amc.nl/>

______________________________________________________
VUmc disclaimer : www.vumc.nl/disclaimer<http://www.vumc.nl/disclaimer>
AMC disclaimer : www.amc.nl/disclaimer<http://www.amc.nl/disclaimer>
_______________________________________________
Rtk-users mailing list
Rtk-users at public.kitware.com<mailto:Rtk-users at public.kitware.com>
https://public.kitware.com/mailman/listinfo/rtk-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://public.kitware.com/pipermail/rtk-users/attachments/20201124/515ac292/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 15849 bytes
Desc: image001.png
URL: <https://public.kitware.com/pipermail/rtk-users/attachments/20201124/515ac292/attachment-0001.png>


More information about the Rtk-users mailing list