I am having trouble getting my Python environment set up and I know that I have screwed something up. I am building from sources and install to the system site-packages directory. The install stores many ITK related .py files and an itk directory. I receive the following error when running Python from any directory other than the build directory. Interestingly enough “import itk” works from any directory, but none of the attributes are correctly seen. The inspect module shows that itk.pyc contains the import code. I know that I should not run Python from the build directory, but can you tell me the best practices for setting PYTHONPATH, if it needs to be set at all? I did set it to the itk subdirectory of site-packages, but this did not work. It seems that the problem should be very easy to solve and maybe it just involves my removing some cruft from the lib64 directories.
Traceback (most recent call last):
File “”, line 1, in
AttributeError: ‘module’ object has no attribute ‘Image’