2017-06-21 5 views
1

Ich habe versucht, robotframework-selenium2library zu installieren, aber einen pkg_resources.VersionConflict Fehler gemacht:Python pip Konflikt für Robot Framework-selenium2library

Downloading/unpacking robotframework-selenium2library 
    Downloading robotframework-selenium2library-1.8.0.tar.gz (118kB): 118kB downloaded 
    Running setup.py (path:/tmp/pip_build_root/robotframework-selenium2library/setup.py) egg_info for package robotframework-selenium2library 
    Traceback (most recent call last): 
     File "<string>", line 17, in <module> 
     File "/tmp/pip_build_root/robotframework-selenium2library/setup.py", line 7, in <module> 
     from ez_setup import use_setuptools 
     File "/tmp/pip_build_root/robotframework-selenium2library/src/ez_setup.py", line 106 
     except pkg_resources.VersionConflict, e: 
              ^
    SyntaxError: invalid syntax 
    Complete output from command python setup.py egg_info: 
    Traceback (most recent call last): 

    File "<string>", line 17, in <module> 

    File "/tmp/pip_build_root/robotframework-selenium2library/setup.py", line 7, in <module> 

    from ez_setup import use_setuptools 

    File "/tmp/pip_build_root/robotframework-selenium2library/src/ez_setup.py", line 106 

    except pkg_resources.VersionConflict, e: 

             ^

SyntaxError: invalid syntax 

---------------------------------------- 
Cleaning up... 
Command python setup.py egg_info failed with error code 1 in /tmp/pip_build_root/robotframework-selenium2library 
Storing debug log for failure in /root/.pip/pip.log 

nicht so viele Pakete sind bereits installiert:

pip list 
> apparmor (2.9.4) 
> LibAppArmor (2.9.4) 
> pip (1.5.6) 
> pygobject (3.14.0) 
> robotframework (3.0.2) 
> robotframework-databaselibrary (1.0.1) 
> selenium (3.4.3) 
> setuptools (3.6) 

python --version 
> Python 2.7.12 

Weiß jemand, wie um dieses Problem zu lösen?

Antwort

2

Die Version von robotframework-selen2library bei PyPI (1.8.0) ist ziemlich alt und unterstützt nur Python 2, während Sie versuchen, es mit Python 3 zu installieren. Verwenden Sie entweder Python 2.7 oder erhalten Sie den neuen Code für das Framework GitHub.

+0

Es wurde verwendet, Python 2.7; Ich werde versuchen, es unabhängig von pip zu installieren, danke – FieryCat

+1

Handbuch 'Python setup.py install' von Git für die Bibliothek den Job erledigen – FieryCat

1

Ich überprüfe die github Seleniumlibrary, und Sie können verwenden:

pip install --pre --upgrade robotframework-seleniumlibrary