简体   繁体   中英

Python Mayavi In Virtual Environment

I am facing 2 issues while trying to use mayavi on Mac OS in virtual python environment.

  1. Running Mayavi2 from command line throws following message only and does nothing else

"This program needs access to the screen. Please run with a Framework build of python, and only when you are logged in on the main display of your Mac."

  1. executing from mayavi import mlab throws the same message as in 1.

  2. Using from mayavi import mlab in eclipse ImportError: cannot import name mlab

After a great hassle I have managed to install mayavi but now I can't execute any of the sample codes involving mlab

vtk is installed. import mayavi has no problem, command line or Eclipse.

It seems you are using the python build provided by Apple in Mac OS. This is apparently not compatible. You should try to use one of the versions from python.org , which are framework builds. Please note that you will have to install your dependencies again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM