2016-08-08 51 views
0

Ich versuche Gooey für Python zu installieren und ich halten auf diesen Fehler in cmd bekommen ... Ich installierte die neueste Version von Pip und auf die neueste Version von Python leite:Python: Installation gooey pip Fehler mit

C:\Users\markj>pip install Gooey 
Collecting Gooey 
    Using cached Gooey-0.9.2.3.zip 
    Complete output from command python setup.py egg_info: 
    Traceback (most recent call last): 
     File "<string>", line 1, in <module> 
     File "C:\Users\markj\AppData\Local\Temp\pip-build-ti2h9xu3\Gooey\setup.py", line 9, in <module> 
     version = __import__('gooey').__version__ 
     File "C:\Users\markj\AppData\Local\Temp\pip-build-ti2h9xu3\Gooey\gooey\__init__.py", line 2, in <module> 
     from gooey.python_bindings.gooey_decorator import Gooey 
     File "C:\Users\markj\AppData\Local\Temp\pip-build-ti2h9xu3\Gooey\gooey\python_bindings\gooey_decorator.py", line 54 
     except Exception, e: 
         ^
    SyntaxError: invalid syntax 

    ---------------------------------------- 
Command "python setup.py egg_info" failed with error code 1 in C:\Users\markj\AppData\Local\Temp\pip-build-ti2h9xu3\Gooey\ 

Kann mir bitte jemand helfen? Vielen Dank!

Antwort

0

Sie führen das Paket wahrscheinlich unter Python 3 aus, das nicht vollständig mit dem Paket kompatibel ist.

Diese Ausnahme bedeutet, dass Ihr Python die Syntax nicht verstehen kann. In Python 3 das Komma (,) is not allowed, korrekte Syntax ist:

except Exception as e 

Einfacher Test auf Python 3:

$ python 
Python 3.4.2 (default, Oct 8 2014, 10:45:20) 
[GCC 4.9.1] on linux 
Type "help", "copyright", "credits" or "license" for more information. 
>>> try: 
...  assert 1 + 1 == 3 
... except Exception, e: 
    File "<stdin>", line 3 
    except Exception, e: 
        ^
SyntaxError: invalid syntax 
>>> 

Mit Python 2.7.9:

$ python 
Python 2.7.9 (default, Mar 1 2015, 12:57:24) 
[GCC 4.9.2] on linux2 
Type "help", "copyright", "credits" or "license" for more information. 
>>> try: 
...  assert 1 + 1 == 3 
... except Exception, e: 
...  print 'false' 
... 
false 
>>> 

Also, versuchen Sie Um Ihr Paket in Python2 zu installieren, sollte es in Ordnung sein.

EDIT 1: Nach this issue ist dieses Paket nur mit Python 2 kompatibel.

1

Sie könnten versuchen, die ZIP-Datei von der offiziellen Website hier herunterladen http://chriskiehl.github.io/Gooey/ und versuchen Sie es herunterladen, um zu sehen, ob das funktioniert.