miykael / gif_your_nifti

How to create fancy GIFs from an MRI brain image
BSD 3-Clause "New" or "Revised" License
118 stars 31 forks source link

RuntimeError: Python is not installed as a framework #3

Closed ilkayisik closed 6 years ago

ilkayisik commented 6 years ago

I use MacOS (El Capitan) and Conda Looks like there is a MacOS related issue in the installation. After I install the package I got this error: RuntimeError: Python is not installed as a framework. The Mac OS X backend will not be able to function correctly if Python is not installed as a framework. See the Python documentation for more information on installing Python as a framework on Mac OS X. Please either reinstall Python as a framework, or try one of the other backends. If you are using (Ana)Conda please install python.app and replace the use of 'python' with 'pythonw'. See 'Working with Matplotlib on OSX' in the Matplotlib FAQ for more information.

After googling it I found this solution on a Stackoverflow page:[https://stackoverflow.com/questions/21784641/installation-issue-with-matplotlib-python]

I assume you have installed the pip matplotlib, there is a directory in you root called ~/.matplotlib.
Create a file ~/.matplotlib/matplotlibrc there and add the following code: backend: TkAgg

After doing this now it works and I can create gifs of my nifti. Hooray!!!

miykael commented 6 years ago

Wohoo! Thanks for the input. But is there another "automated" solution to this? Otherwise, we might need to move to installation via conda. Would that solve the issue?

miykael commented 6 years ago

@ilkayisik - I assume this issue can be closed now as it was taken care of by https://github.com/miykael/gif_your_nifti/pull/5?

ilkayisik commented 6 years ago

Agreed!