Re: [vmtk-users] FW: vmtk Windows installation
Brought to you by:
davidsteinman,
lucantiga
From: Hugo G. v. A. <h.a...@am...> - 2008-11-03 19:27:34
|
Hello Ramachandran, You can see that the error has changed from > ImportError: No module named vmtk to > ImportError: No module named vtk so the VMTK python module can now be found, but the vtk python module can not be found by the vmtk-commanline-script. In your PYTHONPATH I see: "C:\Program Files\VTK\lib\vtk-5.2" I do think that you should change this to: "C:\Program Files\VTK\lib\site-packages" as you have to tell python where to find the directory 'vtk' which contains the necessary python scripts (e.g. 'rendering.py', etc.) good luck, Hugo Ramachandran, Manasi wrote: > Hi Hugo, > > I have set the variable name as PYTHONPATH and I have run INSTALL of both VTK and ITK solution. So now I do have folders for these in my program files. > > My environment variable are set as: > PATH C:\Program Files\CMake 2.6\bin;C:\Program Files\VMTK\bin;C:\Program Files\VTK\bin;C:\Program Files\ITK\bin; > PYTHONPATH C:\Program Files\VMTK\lib\vmtk;C:\Program Files\ITK\lib\InsightToolkit;C:\Program Files\VTK\lib\vtk-5.2 > > And now when I run my vmtk-exe.py from the python shell window, the following is the error message I am getting: > > Traceback (most recent call last): > File "C:\Program Files\VMTK\bin\vmtk-exe.py", line 4, in <module> > from vmtk import pypes > File "C:\Program Files\VMTK\lib\vmtk\vmtk\__init__.py", line 2, in <module> > import vtkvmtk > File "C:\Program Files\VMTK\lib\vmtk\vmtk\vtkvmtk.py", line 5, in <module> > import vtk > ImportError: No module named vtk > > Please give me your suggestions. > > Thank you > Manasi > > ________________________________________ > From: Hugo Gratama van Andel [h.a...@am...] > Sent: Wednesday, October 29, 2008 8:57 AM > To: Luca Antiga > Cc: Ramachandran, Manasi; vmt...@li... > Subject: Re: [vmtk-users] FW: vmtk Windows installation > > Hello Menasi, > > Sorry, I indeed meant to write PYTHONPATH in stead of PYTHON_PATH. This > could explain why you still have the same error. > > Regarding the fact that you cannot find the ITK and VTK folder in your > 'Program Files' folder, you have probably not build the INSTALL project > in the VTK solution and the ITK solution. So solving the first error (by > renaming the environment variable to PYTHONPATH) you will probably get > an error of python that cannot find package VTK until you build the > INSTALL project of VTK. > > good luck. > Hugo > > > Luca Antiga wrote: >> Manasi, >> watch out, the name for the Python environment variable (as Hugo wrote >> in his email) is PYTHONPATH, not PYTHON_PATH. >> if your error is still >> ImportError: No module named vmtk >> it still means your Python does not find the vmtk module in lib\vmtk. >> Keep trying, you're close! >> >> Luca >> >> >> On Oct 28, 2008, at 4:16 PM, Ramachandran, Manasi wrote: >> >>> Hi Hugo >>> >>> I must be doing something wrong here. I created a new environnment >>> variable PYTHON_PATH and added stuff to the environment variable PATH >>> (Right clicked Mycomputer->Properties->Advanced Tab->Environment >>> Variable-> (PATH or PYTHON PATH)..) >>> The following is what I set those to: >>> >>> PYTHON_PATH C:\Program Files\VMTK\lib\vmtk;C:\Program >>> Files\VTK\bin\lib\site-packages;C:\Program Files\ITK\bin\lib >>> PATH C:\Program Files\VMTK\bin;C:\Program Files\VTK\bin;C:\Program >>> Files\ITK\bin >>> where my CMAKE_INSTALL_PREFIX for VTK is C:\Program Files\VTK >>> CMAKE_INSTALL_PREFIX for ITK is C:\Program Files\ITK >>> CMAKE_INSTALL_PREFIX for VMTK is C:\Program Files\VMTK >>> >>> and I still get the same error. >>> I can find my VMTK folder in program files but I cannot find the ITK >>> and VTK folders in C:/Program Files. Do you think indicates wrong >>> installation of VTK, ITK? and is this causing errors? >>> >>> Thank you >>> Manasi >>> >>> >>> _______________________________________ >>> From: Hugo Gratama van Andel [h.a...@am...] >>> Sent: Tuesday, October 28, 2008 2:45 AM >>> To: Ramachandran, Manasi >>> Cc: Luca Antiga; vmt...@li... >>> Subject: Re: [vmtk-users] FW: vmtk Windows installation >>> >>> Hello Manasi, >>> >>>> when I try running the vmtk-exe.py from the python shell, I get the >>>> following error. >>>> >>>> Traceback (most recent call last): >>>> File "D:\Download\VMTK\bin\bin\vmtk-exe.py", line 4, in <module> >>>> from vmtk import pypes >>>> ImportError: No module named vmtk >>> You are almost there! You must tell Python where to search for VMTK to >>> be able to import the package vmtk. You do this with an environment >>> variable called 'PYTHONPATH'. This variable should contain the path to >>> directory in which the package (directory) is installed with all the >>> python scripts of vmtk. >>> >>> In case you used the paths suggested in the windows installation notes >>> (http://www.vmtk.org/Main/Installation) this would be >>> "d:\src\vmtk-build\lib\vmtk" >>> >>> If you installed vmtk to another directory (this directory is set by >>> CMAKE and is called CMAKE_INSTALL_PREFIX), e.g. "c:\program files\vmtk" >>> the path added to the environment variable would have to be "c:\program >>> files\vmtk\lib\vmtk". >>> >>> Off course python should also have to know where to find the module VTK >>> and the module ITK, so those paths should also be in the 'PYTHON_PATH' >>> environment variable. >>> >>> For example, the 'PYTHON_PATH' environment variable on my machine is: >>> "C:\packages\VMTK\bin\lib\vmtk;C:\packages\VTK\bin\lib\site-packages;C:\packages\ITK\bin\lib" >>> >>> >>> Where my CMAKE_INSTALL_PREFIX for VMTK was: >>> "C:\packages\VMTK\bin" >>> and the CMAKE_INSTALL_PREFIX for VTK was: >>> "C:\packages\VTK\bin" >>> and the CMAKE_INSTALL_PREFIX for ITK was: >>> "C:\packages\ITK\bin" >>> >>> I assume that you have already included the path to the VMTK DLLs to >>> your environment variable , but to be complete for other readers, your >>> system should also be able to find the shared libraries of VMTK, VTK and >>> ITK, so the paths to this directories should be added to your 'PATH' >>> environment variable. >>> >>> In my case, I added: >>> "C:\packages\vtk\bin\bin;C:\packages\itk\bin\bin;C:\packages\VMTK\bin\bin" >>> >>> to my 'PATH' environment variable. >>> >>> I hope this helps. >>> >>> with kind regards, >>> Hugo >>> >>> >>>> Please let me know what this could be due to. >>>> >>>> Thanks again >>>> Manasi >>>> >>>> ________________________________________ >>>> From: Luca Antiga [luc...@gm...] >>>> Sent: Friday, October 24, 2008 2:44 AM >>>> To: Ramachandran, Manasi >>>> Subject: Re: [vmtk-users] FW: vmtk Windows installation >>>> >>>> Hi Manasi, >>>> the time difference doesn't help. >>>> You're having similar problems as David Welch. >>>> >>>> I attach the latest vmtk version (very close to the next release). >>>> Can you try configuring it with CMake and building? >>>> >>>> Also, I put a windows binary generated by Johannes from Simula using >>>> mingw at this location: >>>> http://villacamozzi.marionegri.it/~luca/v0.7rc++-mingw32.exe >>>> In order to use it, you have to have Python 2.5.2 on your system. >>>> This will allow you to just use vmtk without compiling. >>>> >>>> Luca >>> >>> -- >>> Hugo Gratama van Andel - MSc >>> Academic Medical Centre - University of Amsterdam >>> Dept. Biomedical Engineering & Physics L0-152 >>> Meibergdreef 9 >>> 1105 AZ Amsterdam >>> The Netherlands >>> Phone : +31 20 566 5206 >>> FAX : +31 20 691 7233 >>> e-mail : h.a...@am... > > > -- > Hugo Gratama van Andel - MSc > Academic Medical Centre - University of Amsterdam > Dept. Biomedical Engineering & Physics L0-152 > Meibergdreef 9 > 1105 AZ Amsterdam > The Netherlands > Phone : +31 20 566 5206 > FAX : +31 20 691 7233 > e-mail : h.a...@am... > -- Hugo Gratama van Andel - MSc Academic Medical Centre - University of Amsterdam Dept. Biomedical Engineering & Physics L0-152 Meibergdreef 9 1105 AZ Amsterdam The Netherlands Phone : +31 20 566 5206 FAX : +31 20 691 7233 e-mail : h.a...@am... |