Unable to import Viper (no module named vtk)

Bug #556864 reported by Tor Gillberg
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
DOLFIN
Invalid
Undecided
Unassigned

Bug Description

Hi!
I recently sucesfully installed dorsal, but I can not use Viper in ipython. My problem is very similar to that relating to Question #102151 but there seem not to be a similar solution. I have tried to reinstall vtk-devel and then dorsal, but have not been succesfull.

The following is my output when trying to import viper in ipython.

In [2]: import viper
------------------------------------------------------------
Traceback (most recent call last):
  File "<ipython console>", line 1, in <module>
  File "/Users/tor/Work/FEniCS/lib/python2.6/site-packages/viper/__init__.py", line 23, in <module>
    from viper import *
  File "/Users/tor/Work/FEniCS/lib/python2.6/site-packages/viper/viper.py", line 48, in <module>
    import vtk, numpy, os, math
ImportError: No module named vtk

Any Ideas?
Thank you!
/Tor

Revision history for this message
Johannes Ring (johannr) wrote :

Sorry, this is not a bug in DOLFIN. It seems that you don't have installed the Python interface to VTK since you are unable to import VTK from Python.

Changed in dolfin:
status: New → Invalid
Revision history for this message
Tor Gillberg (torgi) wrote : Re: [Bug 556864] Re: Unable to import Viper (no module named vtk)

Thanks.
Do you know how I fix that?
I have installed everything that is adviced when installing Dorsal.

Regards
/Tor

On 4/8/10 18:15 , "Johannes Ring" <email address hidden> wrote:

> Sorry, this is not a bug in DOLFIN. It seems that you don't have
> installed the Python interface to VTK since you are unable to import VTK
> from Python.
>
> ** Changed in: dolfin
> Status: New => Invalid

Revision history for this message
Johannes Ring (johannr) wrote :

Have you tried both

  sudo port install vtk-devel +python26

and

  sudo port install vtk-devel +py26

?

And what does

  port variants vtk-devel

give you?

Revision history for this message
Aron Wahlberg (aron-simula) wrote :

When I had this problem, the solution was to install vtk-devel +python26 instead of vtk-devel +py26, which was advised in the dorsal installation at that time. I think that is changed now.

Aron

On 8 Apr, 2010, at 19:15, Tor Gillberg wrote:

>
> Thanks.
> Do you know how I fix that?
> I have installed everything that is adviced when installing Dorsal.
>
> Regards
> /Tor
>
> On 4/8/10 18:15 , "Johannes Ring" <email address hidden> wrote:
>
>> Sorry, this is not a bug in DOLFIN. It seems that you don't have
>> installed the Python interface to VTK since you are unable to import VTK
>> from Python.
>>
>> ** Changed in: dolfin
>> Status: New => Invalid
>
> --
> Unable to import Viper (no module named vtk)
> https://bugs.launchpad.net/bugs/556864
> You received this bug notification because you are a direct subscriber
> of the bug.
>
> Status in DOLFIN: Invalid
>
> Bug description:
> Hi!
> I recently sucesfully installed dorsal, but I can not use Viper in ipython. My problem is very similar to that relating to Question #102151 but there seem not to be a similar solution. I have tried to reinstall vtk-devel and then dorsal, but have not been succesfull.
>
> The following is my output when trying to import viper in ipython.
>
> In [2]: import viper
> ------------------------------------------------------------
> Traceback (most recent call last):
> File "<ipython console>", line 1, in <module>
> File "/Users/tor/Work/FEniCS/lib/python2.6/site-packages/viper/__init__.py", line 23, in <module>
> from viper import *
> File "/Users/tor/Work/FEniCS/lib/python2.6/site-packages/viper/viper.py", line 48, in <module>
> import vtk, numpy, os, math
> ImportError: No module named vtk
>
> Any Ideas?
> Thank you!
> /Tor
>
>
> To unsubscribe from this bug, go to:
> https://bugs.launchpad.net/dolfin/+bug/556864/+subscribe

Revision history for this message
Anders Logg (logg) wrote :

A better solution would be to install a non-crippled operating system
on your shiny macbook ;-)

--
Anders

On Thu, Apr 08, 2010 at 07:21:00PM -0000, Aron Wahlberg wrote:
> When I had this problem, the solution was to install vtk-devel +python26
> instead of vtk-devel +py26, which was advised in the dorsal installation
> at that time. I think that is changed now.
>
> Aron
>
> On 8 Apr, 2010, at 19:15, Tor Gillberg wrote:
>
> >
> > Thanks.
> > Do you know how I fix that?
> > I have installed everything that is adviced when installing Dorsal.
> >
> > Regards
> > /Tor
> >
> > On 4/8/10 18:15 , "Johannes Ring" <email address hidden> wrote:
> >
> >> Sorry, this is not a bug in DOLFIN. It seems that you don't have
> >> installed the Python interface to VTK since you are unable to import VTK
> >> from Python.
> >>
> >> ** Changed in: dolfin
> >> Status: New => Invalid
> >
>

Revision history for this message
Tor Gillberg (torgi) wrote :
Download full text (3.5 KiB)

Very tempting suggestion...

I installed my vtk-devel as adviced in dorsal - and the same way that worked
for Aron, vtk-devel +python26. This gives:

    $ port installed vtk-devel
  vtk-devel @5.4.2_1+cocoa+data+doc+examples+python26+shared+testing
(active)

However I am now trying to install vtk-devel +py26, to see if there is any
improvement. I have an other issue which might be related, and I do not
know how to fix. I can not 'import Scientific' in python. I have
python-scientific installed via macport, and a reinstallation does not help.
Any easy fix, or is it maybe related?

I get a quite substantial output when running:

     $ port variants vtk-devel
vtk-devel has the variants:
   boost: use Boost libraries - www.boost.org
   carbon: build with Carbon
     * conflicts with cocoa x11
[+]cocoa: build with Cocoa
     * conflicts with carbon x11
   core: provide data doc examples testing
     * requires data doc examples testing
   darwin_8: Platform variant, selected automatically
   darwin_9: Platform variant, selected automatically
[+]data: provide example data in: /opt/local/share/vtk-5.4/data
   database: provide all database variants
     * requires mysql5 odbc pgsql84
   debug: debug build
     * conflicts with release
[+]doc: provide doxygen documentation in: /opt/local/share/vtk-5.4/doc
[+]examples: provide VTK examples in: /opt/local/share/vtk-5.4/examples
   huge: provide core cocoa shared wrap database mpi boost
     * requires boost cocoa core database mpi shared wrap
   java: java wrapper
   mpi: use message passing interface (mpich2) for parallel support
   mysql5: build the MySQL driver for vtkSQLDatabase
   odbc: build the ODBC database interface
   pgsql83: build the PostgreSQL 8.3 driver for vtkSQLDatabase
     * conflicts with pgsql84
   pgsql84: build the PostgreSQL 8.4 driver for vtkSQLDatabase
     * conflicts with pgsql83
   python25: python 2.5 wrapper
     * conflicts with python26
     * requires shared
   python26: python 2.6 wrapper
     * conflicts with python25
     * requires shared
   release: release build
     * conflicts with debug
[+]shared: build shared libraries
   tcl: tcl wrapper (MacPorts tcl/tk)
     * conflicts with tcl_apple
   tcl_apple: tcl wrapper (Apple tcl/tk framework)
     * conflicts with tcl
[+]testing: provide VTK tests in: /opt/local/share/vtk-5.4/testing
     * requires data
   universal: Build for multiple architectures
   wrap: provide java, python26, & tcl
     * requires java python26 tcl
   x11: build with X11
     * conflicts with carbon cocoa

On 4/8/10 21:34 , "Anders Logg" <email address hidden> wrote:

> A better solution would be to install a non-crippled operating system
> on your shiny macbook ;-)
>
> --
> Anders
>
>
> On Thu, Apr 08, 2010 at 07:21:00PM -0000, Aron Wahlberg wrote:
>> When I had this problem, the solution was to install vtk-devel +python26
>> instead of vtk-devel +py26, which was advised in the dorsal installation
>> at that time. I think that is changed now.
>>
>> Aron
>>
>> On 8 Apr, 2010, at 19:15, Tor Gillberg wrote:
>>
>>>
>>> Thanks.
>>> Do you know how I fix that?
>>> I have installed everything that is adviced when installing Dorsal.
>>>
>>> ...

Read more...

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Related questions

Remote bug watches

Bug watches keep track of this bug in other bug trackers.