rebotframework+selenium2library+RIDE,以上都安装好,版本如下,现想安装AutoItLibrary,之前安装好一次,但是导入红色,又卸载了,再安装提示以下,setup.py的print语句都加了()了
E:\python\AutoItLibrary-1.1>python setup.py install
Don't think we need to unregister the old one...
%SYSTEMROOT%\system32\regsvr32.exe /S E:\python\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll
python E:\python\Lib\site-packages\win32com\client\makepy.py E:\python\Lib\site-packages\AutoItLibrary\lib\AutoItX3.dll
Generating to E:\python\lib\site-packages\win32com\gen_py\F8937E53-D444-4E71-9275-35B64210CC3Bx0x1x0.py
Building definitions from type library...
Generating...
Importing module
running install
running build
running build_py
running install_lib
byte-compiling E:\python\Lib\site-packages\AutoItLibrary\Logger.py to Logger.cpython-37.pyc
File "E:\python\Lib\site-packages\AutoItLibrary\Logger.py", line 28
print '*%s* %s' % (level, message)
^
SyntaxError: invalid syntax
byte-compiling E:\python\Lib\site-packages\AutoItLibrary\__init__.py to __init__.cpython-37.pyc
File "E:\python\Lib\site-packages\AutoItLibrary\__init__.py", line 269
raise Exception, "Failed to run %s" % cmd
^
SyntaxError: invalid syntax
running install_data
running install_egg_info
Removing E:\python\Lib\site-packages\AutoItLibrary-1.1-py3.7.egg-info
Writing E:\python\Lib\site-packages\AutoItLibrary-1.1-py3.7.egg-info
E:\python\AutoItLibrary-1.1>pip list
Package Version
------------------------------- -----------
AutoItLibrary 1.1
numpy 1.20.2
Pillow 8.2.0
pip 21.0.1
Pygments 2.8.1
Pypubsub 4.0.3
pywin32 300
robotframework 3.1.2
robotframework-pythonlibcore 2.2.1
robotframework-ride 1.7.4.2
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary 5.1.3
selenium 3.141.0
setuptools 47.1.0
six 1.15.0
urllib3 1.26.4
wxPython 4.0.7.post2
楼主解决了吗
第一个问题:
将print '%s %s' % (level, message)改为print('%s %s' % (level, message))
也就是将python2的语法改为python3
第二个问题:
删除所有关于这个包的信息,重新用robotframework-autoitlibrary-1.2.4该包进行安装不会报错