-
-
Notifications
You must be signed in to change notification settings - Fork 663
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 wrapping broken in 5.1.1 #2005
Comments
I am experiencing similar issues. @thewtex is on vacation next two weeks, I am afraid this will have to wait until he comes back. |
I've been digging through it as well. I've worked through some path issues that were causing the errors, but I now have a crash whenever the lazy loading kicks in. If I can get that nailed down tomorrow, I'll offer a workaround. I wouldn't suggest making it a PR unless I could test that the Python wheel-making process works, but it might get folks working until @thewtex gets back. |
Not 100% confirmed, but this @aylward says it's working for him with Ninja + Visual Studio (which uses Ninja's path layout), so it might be the path issue is specific to Visual Studio's output folder structure. |
(1) C:\src\ITK-fork-build\Wrapping\Generators\Python\Release (2) C:\src\ITK-fork-build\Wrapping\Generators\Python\itk (3) C:\src\ITK-fork-build\Wrapping\Generators\Python\itk\Release WrapITK.pth contents:
OK, from what I gather, itkBase.py etc. need to be in a root directory, itk needs to be a subdirectory within that root, and all the _ITKBlahBlahPython.pyd files need to be alongside the itkBlahBlahPython.py files in the itk subdirectory. So, move all the files in (3) into (2), then move the folder of (2) into (1). You WrapITK.pth file will now look like:
|
Thanks @brad-t-moore. I can confirm that building with CMake, Ninja and VS2019 works fine and WrapITK.pth shows only two paths:
For the standard VS2019 (without ninja) I also have a folder EDIT: Of course the recommend way of moving files works as expected, so that all files reside in |
@MrTzschr @brad-t-moore a patch is available to enable debugging with WrapITK.pth in #2032 |
Hello everyone,
I successfully compiled ITK 5.1 from the release branch using the following setup:
The CMake flags i used:
Compilation works without errors but python integration seems broken:
Looking at the content of the WrapITK.pth file I suspected the paths (shortened here to the relevant parts) are incorrect, I have these:
The last entry looks wrong to me and I thought it should point to the folder above, I also tried that and the import works but accessing itk modules doesn't:
I noticed that the structure of python files within ITK changed from 5.0.1 (ITK-5.1-bin/lib) to 5.1 (ITK-5.1-bin/Wrapping/Generators/Python/). Maybe something got messed up here.
Any help is appreciated.
The text was updated successfully, but these errors were encountered: