0

我是 Python 新手,我正在尝试使用 Robot Framework 自动化测试。当我尝试通过下载库时pip遇到了一些问题。我正在使用Python 3.5.1, Robot Framework 3.0, PyCharm 2016.1(64),

命令的输出pip install robotframework-selenium2library Collecting robotframework-selenium2library Using cached robotframework-selenium2library-1.7.4.tar.gz Complete output from command python setup.py egg_info: Downloading http://pypi.python.org/packages/source/d/distribute/distribute-0.6.14.tar.gz Extracting in C:\Users\Radek\AppData\Local\Temp\tmpooendh2g Traceback (most recent call last): File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 143, in use_setuptools raise ImportError ImportError 在处理上述异常期间,发生了另一个异常:

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "C:\Users\Radek\AppData\Local\Temp\pip-build-gh4jw21a\robotframework-selenium2library\setup.py", line 8, in <module>
    use_setuptools()
  File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 145, in use_setuptools
    return _do_download(version, download_base, to_dir, download_delay)
  File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 125, in _do_download
    _build_egg(egg, tarball, to_dir)
  File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 99, in _build_egg
    _extractall(tar)
  File "c:\users\radek\appdata\local\programs\python\python35\lib\site-packages\ez_setup.py", line 467, in _extractall
    self.chown(tarinfo, dirpath)
TypeError: chown() missing 1 required positional argument: 'numeric_owner'

----------------------------------------

命令“python setup.py egg_info”在 C:\Users\Radek\AppData\Local\Temp\pip-build-gh4jw21a\robotframework-selenium2library\ 中失败,错误代码为 1

安装工具是最新的,ez_setup 也是最新的

C:\Users\Radek>pip install --upgrade setuptools Requirement already up-to-date: setuptools in c:\users\radek\appdata\local\programs\python\python35\lib\site-packages C:\Users\Radek>pip install ez_setup Requirement already satisfied (use --upgrade to upgrade): ez-setup in c:\users\radek\appdata\local\programs\python\python35\lib\site-packages

4

1 回答 1

2

Selenium2Library(尚)不兼容 Python 3.x。

我们有一个 Pull Request (github.com/robotframework/Selenium2Library/pull/564) 让 Selenium2Library 与所有 Python 版本兼容,但它不在官方 Release 中,并且已使用 Python 2.6、2.7 和 3.4 进行了测试。

我你想安装你可以试试 github.com/HelioGuilherme66/robotframework-selenium2library/releases/tag/v1.8.0b1 例如: pip install -U --pre https://github.com/HelioGuilherme66/robotframework-selenium2library /archive/v1.8.0b1.zip

于 2016-04-05T23:46:59.767 回答