FieryCat
FieryCat

Reputation: 1899

Python pip conflict for robotframework-selenium2library

I've tried to install robotframework-selenium2library but taken a pkg_resources.VersionConflict error:

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

Not so many packages have been already installed:

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

Does anybody know how to resolve that issue?

Upvotes: 1

Views: 1649

Answers (2)

Christian Vasquez
Christian Vasquez

Reputation: 51

I review the github Seleniumlibrary, and you can use:

pip install --pre --upgrade robotframework-seleniumlibrary  

Upvotes: 1

phd
phd

Reputation: 95080

The version of robotframework-selenium2library at PyPI (1.8.0) is rather old and supports only Python 2 while you're trying to install it with Python 3. Either use Python 2.7 or get the new code for the framework from GitHub.

Upvotes: 2

Related Questions