How can I run runsnakerun on Mac OS X inside a conda environment?

1.3k views Asked by At

I've created a conda environment so I can use runsnakerun on my Mac as follows:

conda create -n runsnake wxPython
source activate runsnake
pip install runsnakerun

However, when I now attempt to use runsnake I get:

$ runsnake
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.

How can I get runsnake to work?

1

There are 1 answers

0
Chris Withers On BEST ANSWER

The problem is that conda's python is not a "framework python" on Mac, their decision is that you have to use pythonw instead. Unfortunately, pip builds entry point scripts using python not pythonw and, to make matters worse, RunSnakeRun does a horrible subprocess dance to launch itself in 32-bit mode on 64-bit macs.

The upshot is that the only hacky workaround I can think of to launch runsnake is as follows:

VERSIONER_PYTHON_PREFER_32_BIT=yes pythonw `which runsnake32`

I'm not actually sure that environment variable is even needed anymore, but the above does what the entry point appears to be trying to do and does at least start the RunSnakeRun gui.