Opened 11 years ago

Closed 11 years ago

Last modified 10 years ago

#37355 closed defect (worksforme)

py27-mayavi: build ok, but unusable with error `ImportError: No module named cocoa_render_window`

Reported by: nilstec_inc@… Owned by: jjstickel (Jonathan Stickel)
Priority: Normal Milestone:
Component: ports Version: 2.1.2
Keywords: Cc: jfilippidis@…
Port: py27-mayavi

Description

I installed mayavi for python 2.7 using the following ports

vtk5 @5.10.1_0+python27+qt4_mac
py27-mayavi @4.1.0_0
py27-pyqt4 @4.9.6_1

Install went fine without problems. But when I try using it, doing

ipython
from mayavi import mlab
mlab.test_points3d()

I get the error message ImportError: No module named cocoa_render_window. I'll supply port installed and the full error message from python.

Attachments (4)

port_installed.txt (25.4 KB) - added by nilstec_inc@… 11 years ago.
Output of port installed
python_error.txt (7.0 KB) - added by nilstec_inc@… 11 years ago.
Python error output
error_python.txt (3.8 KB) - added by nilstec_inc@… 11 years ago.
Error output of pure python
tvtk_classes_content.txt (226.8 KB) - added by nilstec_inc@… 11 years ago.
contents of tvtk_classes.zip found in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tvtk

Download all attachments as: .zip

Change History (14)

Changed 11 years ago by nilstec_inc@…

Attachment: port_installed.txt added

Output of port installed

Changed 11 years ago by nilstec_inc@…

Attachment: python_error.txt added

Python error output

comment:1 Changed 11 years ago by ryandesign (Ryan Carsten Schmidt)

Cc: gmail.com:jjstickel openmaintainer removed
Owner: changed from macports-tickets@… to jjstickel@…

Note that the Cc field needs valid email addresses, and that openmaintainer is not a person so Cc'ing that address is not useful.

comment:2 Changed 11 years ago by jjstickel (Jonathan Stickel)

I am not sure why you are receiving this error. The relevant ports appear to be installed and with the correct variants (+qt4_mac is not needed for VT5, but it should not hurt either). Just to make sure it is not a problem with ipython, do you get the same error from python?

[bash terminal] & python2.7
>>> from mayavi import mlab
>>> mlab.test_points3d()
Last edited 11 years ago by jjstickel (Jonathan Stickel) (previous) (diff)

comment:3 Changed 11 years ago by nilstec_inc@…

Unfortunately I get the same error using only python.

Changed 11 years ago by nilstec_inc@…

Attachment: error_python.txt added

Error output of pure python

comment:4 Changed 11 years ago by jjstickel (Jonathan Stickel)

OK, that rules out some problem with ipython. Can you check the contents of

/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tvtk/tvtk_classes.zip

to see if it contains cocoa_render_window.py? If not, you can try rebuilding py27-mayavi.

comment:5 Changed 11 years ago by nilstec_inc@…

I can not find cocoa_render_window.py in that file. Ill supply the file contents, and try rebuilding py27-mayavi. Thank you very much!

Last edited 11 years ago by nilstec_inc@… (previous) (diff)

Changed 11 years ago by nilstec_inc@…

Attachment: tvtk_classes_content.txt added

contents of tvtk_classes.zip found in /opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/tvtk

comment:6 Changed 11 years ago by nilstec_inc@…

I did

sudo port uninstall py-mayavi
sudo port uninstall py27-mayavi
sudo port install py27-mayavi

and now it works! The above given file now contains cocoa_render_window.py. Thank you very much for your time!

comment:7 Changed 11 years ago by jjstickel (Jonathan Stickel)

Glad to hear it!

Developers: this ticket can be closed.

comment:8 Changed 11 years ago by mf2k (Frank Schima)

Resolution: worksforme
Status: newclosed

comment:9 Changed 11 years ago by dcnicholls

Thanks for this thread. Exacty the same problem, exactly the same solution. "works for me". DN

comment:10 Changed 10 years ago by jfilippidis@…

Cc: jfilippidis@… added

Cc Me!

Note: See TracTickets for help on using tickets.