2016-03-20 6 views
0

nicht finden Ich verwende dieses Tutorial (ab 2013) mit PyObjC (http://blog.adamw523.com/os-x-cocoa-application-python-pyobjc/).PyObjC App kann Moves Modul

Wenn jedoch nach der Verwendung von python setup.py py2app ausgeführt wird, erhalte ich die folgende Fehlermeldung, wenn "dist/RocketGui.app/Contents/MacOS/RocketGui" ausgeführt wird:

Mar 19 20:43:19 RocketGui[1863] <Notice>: Traceback (most recent call last): 
Mar 19 20:43:19 RocketGui[1863] <Notice>: File "/Users/*******/Desktop/Projects/Rocket/Software/dist/RocketGui.app/Contents/Resources/__boot__.py", line 136, in <module> 
Mar 19 20:43:19 RocketGui[1863] <Notice>:  _run() 
Mar 19 20:43:19 RocketGui[1863] <Notice>: File "/Users/*******/Desktop/Projects/Rocket/Software/dist/RocketGui.app/Contents/Resources/__boot__.py", line 121, in _run 
Mar 19 20:43:19 RocketGui[1863] <Notice>:  exec(compile(source, path, 'exec'), globals(), globals()) 
Mar 19 20:43:19 RocketGui[1863] <Notice>: File "/Users/*******/Desktop/Projects/Rocket/Software/dist/RocketGui.app/Contents/Resources/RocketGui.py", line 1, in <module> 
Mar 19 20:43:19 RocketGui[1863] <Notice>:  from Cocoa import * 
Mar 19 20:43:19 RocketGui[1863] <Notice>: File "Cocoa/__init__.pyc", line 8, in <module> 
Mar 19 20:43:19 RocketGui[1863] <Notice>: File "objc/__init__.pyc", line 32, in <module> 
Mar 19 20:43:19 RocketGui[1863] <Notice>: File "objc/_bridgesupport.pyc", line 13, in <module> 
Mar 19 20:43:19 RocketGui[1863] <Notice>: File "pkg_resources/__init__.pyc", line 49, in <module> 
Mar 19 20:43:19 RocketGui[1863] <Notice>: ImportError: No module named moves 
Mar 19 20:43:19 RocketGui[1863] <Notice>: 2016-03-19 20:43:19.989 RocketGui[1863:8841237] RocketGui Error 

ich folgendes getan:

pip install -U six 

Nach dem Stochern im Internet sieht es jedoch so aus, als ob PyObjC möglicherweise nicht mehr unterstützt wird. Gibt es eine Lösung dafür oder sollte ich Frameworks wechseln (ich bevorzuge etwas, das ich mit pip installieren kann)?

Antwort

0

Haben Sie versucht, die Abhängigkeit zu setup.py hinzuzufügen? Sie können entweder fügen Sie includes oder packages, zum Beispiel:

setup(
    app=['main.py'], 
    name="AppName", 
    data_files=['en.lproj'], 
    setup_requires=['py2app'], 
    options=dict(py2app=dict(iconfile='en.lproj/icon.icns', 
          includes=['lxml.etree', 'lxml._elementpath', 'pdflib_py', 'Image', 'unirest'], 
          packages=['packageName'] 
          ) 
       ) 
) 

Es ist auch möglich, die Anwendung in Alias-Modus wie folgt auszuführen:

python setup.py py2app -A 

auf diese Weise die auf Ihrem System installierten Pakete werden verwendet, die während der Entwicklung schneller ist.