ich anaconda installiert stattdessen Python von Systems auf dem Mac, aber wenn ichWx kann nicht auf dem Mac laufen
import wx
app = wx.App()
Typ I got this:
Dieses Programm benötigt Zugriff auf den Bildschirm. Bitte laufen Sie mit einem Framework Build von Python, und nur wenn Sie auf dem Hauptbildschirm Ihres Mac angemeldet sind.
Ich benutze die script:
#!/bin/bash
# what real Python executable to use
PYVER=2.7
PYTHON=/Library/Frameworks/Python.framework/Versions/$PYVER/bin/python$PYVER
# find the root of the virtualenv, it should be the parent of the dir this script is in
ENV=`$PYTHON -c "import os; print os.path.abspath(os.path.join(os.path.dirname(\"$0\"), '..'))"`
# now run Python with the virtualenv set as Python's HOME
export PYTHONHOME=$ENV
exec $PYTHON "[email protected]"
aber es verwendet nur das System python.Can't die lib in anaconda verwenden. Ich möchte die WX GUI in Anaconda verwenden, wie das Problem zu lösen?
Es ist lange her, seit ich Anaconda sah. Hat es ein 'Python.framework' in seiner Installation? Was ist mit einem 'Pythonw'? – RobinDunn
Es gibt kein Python.framework oder pythonw in Anaconda. – XiaXuehai
Wenn Sie 'conda' verwenden, um' python.app' zu installieren, erhalten Sie ein '{prefix}/bin/pythonw'-Skript, das die Framework-Version von Python ausführt. Sie können auch 'conda' verwenden, um wxPython zu installieren. – RobinDunn