Installation von pywinauto schlägt fehl

Probleme bei der Installation?
Antworten
bremer
User
Beiträge: 109
Registriert: Sonntag 25. Mai 2008, 00:13

Win XP Pro, neueste Version von pywinauto (0.3.7), Python 2.6.

Hier mal mein Auszug aus der Konsole (mit Adminrechten):
python C:\Python26\pywinauto-0.3.7\setup.py install
C:\Python26\pywinauto-0.3.7\pywinauto\findbestmatch.py:36: Deprecati
s module is deprecated
import sets
running install
running build
running build_py
package init file 'pywinauto\__init__.py' not found (or not a
error: package directory 'pywinauto\tests' does not exist
Wenn ich nachschaue, sind alle Dateien an ihrem Platz.

Hat jemand Erfahrung damit?
Leonidas
Python-Forum Veteran
Beiträge: 16025
Registriert: Freitag 20. Juni 2003, 16:30
Kontaktdaten:

Naja, dann wechsel mal in das Verzeichnis wo die ``setup.py`` ist, denn der Pfad ist höchstwarscheinlich relativ und in deinem aktuellen Verzeichnis gibt es kein pywinauto\tests.
My god, it's full of CARs! | Leonidasvoice vs (former) Modvoice
bremer
User
Beiträge: 109
Registriert: Sonntag 25. Mai 2008, 00:13

So, ich musste alles ins Verzeichnis Python26 kopieren, dann ging die Installation erst.

Dann kommt aber das:
>>> from pywinauto import application

Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
from pywinauto import application
File "C:\Python26\pywinauto-0.3.7\pywinauto\__init__.py", line 28, in <module>
import findwindows
File "C:\Python26\pywinauto-0.3.7\pywinauto\findwindows.py", line 35, in <module>
import findbestmatch
File "C:\Python26\pywinauto-0.3.7\pywinauto\findbestmatch.py", line 36, in <module>
import sets
File "C:\Python26\lib\sets.py", line 85, in <module>
stacklevel=2)
File "C:\Python26\lib\warnings.py", line 29, in _show_warning
file.write(formatwarning(message, category, filename, lineno, line))
TypeError: idle_formatwarning_subproc() takes exactly 4 arguments (5 given)
Weder die Installationsanleitung von der Homepage noch die in der Readme.txt sind korrekt.

Ich bin kurz davor alles zu zertrümmern.

edit: Ja, SendKeys ist installiert.
fhoech
User
Beiträge: 143
Registriert: Montag 9. April 2007, 18:26

So, ich musste alles ins Verzeichnis Python26 kopieren, dann ging die Installation erst.
Das ist ja abenteuerlich.

Der Standardweg funktioniert bei mir (WinXP, Python 2.6):
cd pywinauto-0.3.7
setup.py install
C:\Downloads\pywinauto-0.3.7\pywinauto\findbestmatch.py:36: DeprecationWarning: the sets module is deprecated
import sets
running install
running build
running build_py
creating build
creating build\lib
creating build\lib\pywinauto
copying pywinauto\application.py -> build\lib\pywinauto
[...build log hier von mir gekürzt...]
creating build\lib\pywinauto\tests
copying pywinauto\tests\allcontrols.py -> build\lib\pywinauto\tests
[...build log hier von mir gekürzt...]
creating build\lib\pywinauto\controls
copying pywinauto\controls\common_controls.py -> build\lib\pywinauto\controls
[...build log hier von mir gekürzt...]
running install_lib
creating C:\Python26\Lib\site-packages\pywinauto
copying build\lib\pywinauto\application.py -> C:\Python26\Lib\site-packages\pywinauto
copying build\lib\pywinauto\clipboard.py -> C:\Python26\Lib\site-packages\pywinauto
creating C:\Python26\Lib\site-packages\pywinauto\controls
copying build\lib\pywinauto\controls\common_controls.py -> C:\Python26\Lib\site-packages\pywinauto\controls
[...build log hier von mir gekürzt...]
creating C:\Python26\Lib\site-packages\pywinauto\tests
copying build\lib\pywinauto\tests\allcontrols.py -> C:\Python26\Lib\site-packages\pywinauto\tests
[...build log hier von mir gekürzt...]
byte-compiling C:\Python26\Lib\site-packages\pywinauto\application.py to application.pyc
[...build log hier von mir gekürzt...]
running install_egg_info
Writing C:\Python26\Lib\site-packages\pywinauto-0.3.7-py2.6.egg-info

Code: Alles auswählen

Python 2.6 (r26:66721, Oct  2 2008, 11:35:03) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>> from pywinauto import application
C:\Python26\lib\site-packages\pywinauto\findbestmatch.py:36: DeprecationWarning:
 the sets module is deprecated
  import sets
>>> app = application.Application.start("notepad.exe")
(startet Notepad)

Die DeprecationWarnings deuten darauf hin, dass das Modul noch nicht an Python 2.6 angepasst wurde, das scheint aber auch schon alles zu sein.
Antworten