Lot_to_learn
Lot_to_learn

Reputation: 622

No module named itk (Insighttolkit) in Python

I am novice in python and Simple_ITK both to process .mha 3D image files. I have two problems:

  1. When ever I install ITK, I always get an error as shown below: make ***[all] error 2 and somehow I install ITK It doesn't work at all having no connectivity with python. And I also tried python-insighttoolkit3 package then it shows and error of

" Can't down load Python 2.8:i386" in Ubuntu software Center. I have tried various methods to install Insight Tool Kit in Ubuntu whatever I found but most of the time I get the same error as shown in picture above.

So can anybody guide me how to install and build ITK so that no error like no module named itk found.

  1. Now another problem is I have a .py file and it has a class in which I have to fed input externally otherwise it will consider as None. SO I tried to call the file as

import /path/to/file/xxx.py

but it gives an Syntax error: invalid syntax

so how to call class from a python file from python Console .

Now, I'm using Ubuntu 15.02. For any missing details please ask.

Thanks.

Upvotes: 1

Views: 3877

Answers (1)

Jalo
Jalo

Reputation: 1129

1- For what I see in the image, I see that you are trying to install ITK instead of SimpleITK. For SimpleITK it is very simple using a linux package installer, like pip or easy-install. in this link you have the instructions to install it correctly. Remember to execute the instructions as super user. Maybe it is the reason of your error ( I can't see the instruction you are writing in the console ).

2- I recommend you to read the Python tutorial for modules The fastest way is to be located first on the directory of your .py file. The sequence would be:

cd /path

import module.py

Upvotes: 2

Related Questions