Hi Luca,

No luck - still says no module named vtk.

I learnt that vmtk relied on vtk and I was trying to test an example from
vtk's tutorial folder before running vmtk but I had an error like :

Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
Xlib:  extension "GLX" missing on display ":0.0".
ERROR: In /home/vm308/src/VTK/Rendering/vtkXOpenGLRenderWindow.cxx, line 404
vtkXOpenGLRenderWindow (0xc4c75a0): Could not find a decent visual


Segmentation fault


Vikram.


On Fri, Oct 29, 2010 at 3:11 PM, Luca Antiga <luca.ant...@gmail.com> wrote:

> Hi Vikram,
>  ok, so vmtk relies on vtk, and if vtk doesn't work, there's no chance vmtk
> will work either.
> First things first: getting vtk to work.
>
> Try adding these lines to the usual .bashrc file:
> PYTHONPATH=/usr/local/lib/python2.7/site-packages:$PYTHONPATH
> export PYTHONPATH
>
> and repeat the python, import vtk thing.
>
> Luca
>
>
> On Oct 29, 2010, at 4:07 PM, Vikram Mehta wrote:
>
> Hi Luca,
>
> I know this is hard. Unfortunately I do not have anyone around me to go to
> which is why I am on the mailing lists. I really appreciate your help.
>
> Unfortunately, there seems to be an error in this too !
>
> On calling python, I get :
>
> Python 2.7 (r27:82500, Oct 20 2010, 11:56:48)
> [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import vtk
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> ImportError: No module named vtk
> >>>
>
> Best regards,
> Vikram.
>
>
>
>
> On Fri, Oct 29, 2010 at 2:58 PM, Luca Antiga <luca.ant...@gmail.com>wrote:
>
>> Hi Vikram,
>>  I'm really not sure here, troubleshooting at a distance is hard. vmtk has
>> binary packages available for Ubuntu (plus Mac OSX and Windows), which means
>> that if you are on Ubuntu you can just install it with a couple of commands
>> without configuration hassles. However, I'm not sure if you have the freedom
>> to choose what distribution to use.
>>
>> Having said this, let's try to take a step back: what happens if you enter
>> the python interpreter by calling
>> python
>> and from there typing
>> import vtk
>> ?
>>
>> Luca
>>
>> On Oct 29, 2010, at 3:51 PM, Vikram Mehta wrote:
>>
>> Hi Luca,
>>
>> I tried what you suggested but it says there is no module by that name.
>>
>> Best regards,
>> vikram
>>
>>
>> On Fri, Oct 29, 2010 at 2:28 PM, Luca Antiga <luca.ant...@gmail.com>wrote:
>>
>>> Hi Vikram,
>>>  it looks like your system has two versions of the Tcl library, one that
>>> you compiled against, and one that Python is expecting to find.
>>>
>>> Anyway, you can go ahead without fixing the problem, since you don't
>>> strictly need the Tk GUI on linux, you can run everything from the command
>>> line.
>>>
>>> Try something like
>>>
>>> vmtkimagereader --help
>>>
>>> and see if you get this sort of output:
>>>
>>> Creating vmtkImageReader instance.
>>> Automatic piping vmtkimagereader
>>> Parsing options vmtkimagereader
>>>
>>> vmtkimagereader : read an image and stores it in a vtkImageData object
>>>   Input arguments:
>>>    -id Id (str,1); default=0: script id
>>>    -handle Self (self,1): handle to self
>>>    -disabled Disabled (bool,1); default=0: disable execution and
>>>      piping
>>> [...]
>>>
>>> Luca
>>>
>>> On Oct 29, 2010, at 1:59 PM, Vikram Mehta wrote:
>>>
>>> Hi Luca,
>>>
>>> I know it was an example which is why I was surprised it still showed up
>>> even after my bashrc file had vtk 5.6 in it. Anyway that is fine now.
>>>
>>> But when I call vmtk from my home directory, I receive this error :
>>>
>>>
>>> Traceback (most recent call last):
>>>   File "/usr/local/bin/vmtk", line 49, in <module>
>>>     pypepad.RunPypeTkPad()
>>>   File "/usr/local/lib/vmtk/vmtk/pypepad.py", line 398, in RunPypeTkPad
>>>     root = Tk()
>>>   File "/usr/local/lib/python2.7/lib-tk/Tkinter.py", line 1687, in
>>> __init__
>>>     self._loadtk()
>>>   File "/usr/local/lib/python2.7/lib-tk/Tkinter.py", line 1707, in
>>> _loadtk
>>>     % (_tkinter.TCL_VERSION, tcl_version)
>>> RuntimeError: tcl.h version (8.5) doesn't match libtcl.a version (8.4)
>>>
>>>
>>> I tried looking for it on the net but could not really find any answers
>>> to it.
>>>
>>> What do you suggest I do ?
>>>
>>> Best regards,
>>> Vikram.
>>>
>>>
>>>
>>> On Fri, Oct 29, 2010 at 8:00 AM, Luca Antiga <luca.ant...@gmail.com>wrote:
>>>
>>>> Hi Vikram,
>>>>  vtk-5.3 was there as an example, you should replace it with the
>>>> directory that's actually in your system. In your case it's probably
>>>> /usr/local/lib/vtk-5.6
>>>>
>>>> Also, by running ./vmtk from the vmtk directory, you are not running the
>>>> installed version, but a file from the source tree. You should avoid this.
>>>> Try calling vmtk (I mean 'vmtk', not './vmtk') from any other location
>>>> (like your home directory).
>>>>
>>>> Best regards
>>>>
>>>> Luca
>>>>
>>>> On Oct 28, 2010, at 8:34 PM, Vikram Mehta wrote:
>>>>
>>>> Hi Luca,
>>>>
>>>> Well, I did edit the bashrc file and mine looks like this :
>>>>
>>>>
>>>> # .bashrc
>>>> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/vmtk
>>>> export LD_LIBRARY_PATH
>>>> PYTHONPATH=$PYTHONPATH:/usr/local/lib/vmtk
>>>> export PYTHONPATH
>>>> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/InsightToolkit
>>>> export LD_LIBRARY_PATH
>>>> LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/vtk-5.6.1
>>>> export LD_LIBRARY_PATH
>>>>
>>>> # Source global definitions
>>>> if [ -f /etc/bashrc ]; then
>>>>         . /etc/bashrc
>>>> fi
>>>>
>>>> # User specific aliases and functions
>>>> alias cp='cp -v -i'
>>>> alias rm='rm -i'
>>>> alias mv='mv -i'
>>>>
>>>> ~
>>>>
>>>> ~
>>>>
>>>> ~
>>>>
>>>> When I type the following
>>>>  echo $LD_LIBRARY_PATH , I get the following paths :
>>>>
>>>>
>>>> :/usr/local/lib/vmtk:/usr/local/lib/InsightToolkit:/usr/local/lib/vtk-5.3:/usr/local/lib/vmtk:/usr/local/lib/vmtk:/usr/local/lib/InsightToolkit:/usr/local/lib/vtk-5.3
>>>>
>>>> But I dont understand why the paths show vtk-5.3 when I have installed
>>>> vtk-5.6.1
>>>> What am I doing wrong ?
>>>>
>>>> I still get the same error as before when I run ./vmtk from the vmtk
>>>> directory shown below :I reinstalled vmtk and this time I even ran sudo 
>>>> make
>>>> install after make as I was added to the sudo list.
>>>>
>>>> [vm...@dyn109-239 vmtk-0.9.0]$ ls
>>>> bin                  CMakeLists.txt        Makefile
>>>> VMTKBuildSettings.cmake   vmtk.py
>>>> CMakeCache.txt       Copyright.txt         PypeS
>>>> VMTKConfig.cmake          vmtk.pyc
>>>> CMakeFiles           distribution          TODO.txt
>>>> vmtkenv                   vmtkScripts
>>>> CMakeInput           __init__.py           vmtk
>>>> vmtkenv.py                VMTKUse.cmake
>>>> cmake_install.cmake  install_manifest.txt  vmtk-build
>>>> VMTKLibraryDepends.cmake  vtkVmtk
>>>> [vm...@dyn109-239 vmtk-0.9.0]$ ./vmtk
>>>> Traceback (most recent call last):
>>>>   File "./vmtk", line 4, in <module>
>>>>     from vmtk import pypes
>>>>   File "/home/vm308/src/vmtk-0.9.0/vmtk.py", line 4, in <module>
>>>>     from vmtk import pypes
>>>> ImportError: cannot import name pypes
>>>>
>>>>
>>>> I need your help again please.
>>>>
>>>> Best Regards,
>>>> Vikram.
>>>>
>>>>
>>>>
>>>> On Wed, Oct 27, 2010 at 1:23 PM, Luca Antiga <luca.ant...@gmail.com>wrote:
>>>>
>>>>> Hi Vikram,
>>>>>  the .bashrc file is a file that should be in your home directory (i.e.
>>>>> in /home/vm308), but since it starts with a dot (.bashrc), you may not see
>>>>> it if you just type 'ls' on the command line.
>>>>> Try with
>>>>> ls -a
>>>>> (-a means, all files, including hidden ones), you should see a bunch of
>>>>> "hidden" files. They are used to store user settings for applications.
>>>>> It is also possible that there is no /home/vm308/.bashrc file, in which
>>>>> case you can just create an empty one using
>>>>> touch /home/vm308/.bashrc
>>>>> Now, with any text editor, open .bashrc and type the paths as per the
>>>>> instructions. Save the file and open a new terminal.
>>>>> To be sure the settings are now available to the command line, type
>>>>> echo $LD_LIBRARY_PATH
>>>>> if you see a /usr/local/lib/vmtk among the paths returned by the
>>>>> command above, then you should be all set and vmtk should work.
>>>>> Let me know if this is ok for you.
>>>>> Best regards
>>>>>
>>>>> Luca
>>>>>
>>>>> On Oct 26, 2010, at 4:00 PM, Vikram Mehta wrote:
>>>>>
>>>>> Hello,
>>>>>
>>>>> Regarding your reply, I managed to get added onto the sudo list to
>>>>> execute the 'sudo make install' list. The Cmake error was no longer 
>>>>> showing.
>>>>> But this time the error is again :
>>>>>
>>>>> Traceback (most recent call last):
>>>>>   File "./vmtk", line 4, in <module>
>>>>>     from vmtk import pypes
>>>>>   File "/home/vm308/src/vmtk-0.9.0/vmtk.py", line 4, in <module>
>>>>>     from vmtk import pypes
>>>>> ImportError: cannot import name pypes
>>>>>
>>>>> On the installation pages of vmtk, I think this is the next step :
>>>>>
>>>>>    - Set a couple of environment variables. For Bash users, type the
>>>>>    lines below or add them to your .bash_profile or .bashrc file (the
>>>>>    difference is that with .bash_profile you have to logout and login back
>>>>>    again for them to have an effect, and it may not work when logging in 
>>>>> from
>>>>>    graphical login managers; on the other side, .bashrc is read everytime 
>>>>> a
>>>>>    user opens up a terminal, so it's executed more often but it's safer).
>>>>>    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/vmtk
>>>>>    export LD_LIBRARY_PATH
>>>>>    PYTHONPATH=$PYTHONPATH:/usr/local/lib/vmtk
>>>>>    export PYTHONPATH
>>>>>    - Also, don't forget to also add the paths to the ITK shared
>>>>>    libraries
>>>>>    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/InsightToolkit
>>>>>    export LD_LIBRARY_PATH
>>>>>    * Starting with VTK 5.3, don't forget to also add the paths to the
>>>>>    VTK shared libraries
>>>>>    LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/vtk-5.3
>>>>>    export LD_LIBRARY_PATH
>>>>>
>>>>>
>>>>> But could someone explain stepwise how to go through this since I am
>>>>> new to Linux and cant seem to work around the bash profile.
>>>>> Also, how do you add the above paths to the ITK and VTK shared
>>>>> libraries ?
>>>>>
>>>>> Please help.
>>>>>
>>>>> Vikram.
>>>>>
>>>>>
>>>>> ------------------------------------------------------------------------------
>>>>> Nokia and AT&T present the 2010 Calling All Innovators-North America
>>>>> contest
>>>>> Create new apps & games for the Nokia N8 for consumers in  U.S. and
>>>>> Canada
>>>>> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
>>>>> marketing
>>>>> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi
>>>>> Store
>>>>>
>>>>> http://p.sf.net/sfu/nokia-dev2dev_______________________________________________
>>>>> vmtk-users mailing list
>>>>> vmtk-users@lists.sourceforge.net
>>>>> https://lists.sourceforge.net/lists/listinfo/vmtk-users
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in  U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store 
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
vmtk-users mailing list
vmtk-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/vmtk-users

Reply via email to