Bow
Bow

Reputation: 455

Installing MAYAVI in Mac OS X

I installed Python 2.7 via Home brew and installed all other library packages using pip

To install Mayavi initially, I installed VTK using

brew reinstall --python --qt vtk5

Later, I did

pip install mayavi

but this gives out this error for me:

Building wheels for collected packages: mayavi
Running setup.py bdist_wheel for mayavi ... error
Complete output from command /usr/local/opt/python/bin/python2.7 -u -c "import setuptools,                 
tokenize;__file__='/private/var/folders/t_/x10q3tk92ms64kcjqvxy8s8w0000gn/T/pip-
build-2zB86t/mayavi/setup.py';exec(compile(getattr(tokenize, 'open', open
(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" bdist_wheel -d 
/var/folders/t_/x10q3tk92ms64kcjqvxy8s8w0000gn/T/tmpTxZtPCpip-wheel- --python-tag cp27:

 running bdist_wheel
 running build
 Fatal Python error: PyThreadState_Get: no current thread

Could someone tell how can fix this issue or what is going wrong, apart from that my python works fine.

Thank you

Upvotes: 0

Views: 2198

Answers (2)

PytLab
PytLab

Reputation: 527

I once had many problems when installing and using mayavi.

I think the best and the easiest way to use mayavi is to install enthought canopy

it provides many scientific and analytic Python package distributions including mayavi, vtk and so on.

After installing it, you can visualize your data by executing the python installed in canopy (for example /Users/zjshao/Library/Enthought/Canopy/edm/envs/User/bin/python in my Mac). Then the mayavi would work.

Upvotes: 0

Pierre de Buyl
Pierre de Buyl

Reputation: 7293

The first thing is to check your environment here, via the commands

which python
which pip
which brew
echo $PATH
brew doctor

Installing Python packages on OS X where there is a compilation involved can lead to various errors related to the choice of compiler and python executable.

Upvotes: 1

Related Questions