mayavi2 works but no module named mayavi

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

mayavi2 works but no module named mayavi

Pawel
Hi,

After installing Mayavi2 on my system (Linux Fedora 64bit) using
easy_install, I have no problem running Mayavi from the terminal.
However, when I try to import mayavi from Python, Python can't find it:



I checked my site-packages directory. There are some Mayavi files but no
__init__.pyc file.Can anyone help me out to get Mayavi working in Python?

Thanks!


_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: mayavi2 works but no module named mayavi

Pawel
Pawel <pawelrc@...> writes:

>
> Hi,
>
> After installing Mayavi2 on my system (Linux Fedora 64bit) using
> easy_install, I have no problem running Mayavi from the terminal.
> However, when I try to import mayavi from Python, Python can't find it:
>
> I checked my site-packages directory. There are some Mayavi files but no
> __init__.pyc file.Can anyone help me out to get Mayavi working in Python?
>
> Thanks!
>


Sorry for the newbie question. Also here's what Python shows:

[krakow]]$ python
Python 2.7 (r27:82500, Sep 16 2010, 18:02:00)
[GCC 4.5.1 20100907 (Red Hat 4.5.1-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
%>>> import mayavi
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named mayavi

And here's what I have in the site-packages directory:

[krakow site-packages]$ ls Mayavi-3.3.2-py2.7*
Mayavi-3.3.2-py2.7-nspkg.pth

Mayavi-3.3.2-py2.7.egg-info:
dependency_links.txt  namespace_packages.txt  PKG-INFO      SOURCES.txt
entry_points.txt      not-zip-safe            requires.txt  top_level.txt

Thanks for helping!

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev
Reply | Threaded
Open this post in threaded view
|

Re: mayavi2 works but no module named mayavi

Gael Varoquaux
In reply to this post by Pawel
Hi Pawel,

On Tue, Sep 18, 2012 at 10:58:24PM +0000, Pawel wrote:
> After installing Mayavi2 on my system (Linux Fedora 64bit) using
> easy_install, I have no problem running Mayavi from the terminal.
> However, when I try to import mayavi from Python, Python can't find it:

It's fairly hard for us to debug such an installation problem, as it's
probably system specific.

What comes to me is that you probably have different Python environments
installed and that Mayavi is not installed in the environment that you
are using with the interactive interpreter. you can check this looking at
the first line of the mayavi2 script:

$ head $(which mayavi2)

and seeing if it coincides with the Python executable that you are
running:

$ which python

HTH,

Gael

_______________________________________________
Enthought-Dev mailing list
[hidden email]
https://mail.enthought.com/mailman/listinfo/enthought-dev