通过命令行安装自动库时出错



我需要安装robotframework-autoitlibrary才能在我的测试用例上使用。我的问题是当我尝试使用以下命令通过命令行安装 AutoIt 库时:

pip install -U robotframework-autoitlibrary --no-cache-dir --pre

我有这个错误:

  C:windowssystem32>pip install -U robotframework-autoitlibrary --no-cache- 
    dir --pre
    Collecting robotframework-autoitlibrary
    Downloading 
 https://files.pythonhosted.org/packages/4e/a4/9e51fe35b1da7a006b773c9c234f78e89bcc4f267152c4e9fa8260631fa8/robotframework-autoitlibrary-1.2.2.zip (701kB)
    100% |################################| 706kB 1.6MB/s
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):
      File "<string>", line 1, in <module>
      File "c:usersuser-a~1appdatalocaltemppip-install- 
    oro1ovrobotframework-autoitlibrarysetup.py", line 93, in <module>
        destPath = os.path.normpath(os.path.join(os.getenv("HOMEDRIVE"), 
    r"RobotFrameworkExtensionsAutoItLibrary"))
      File "c:python27libntpath.py", line 65, in join
        result_drive, result_path = splitdrive(path)
      File "c:python27libntpath.py", line 115, in splitdrive
        if len(p) > 1:
    TypeError: object of type 'NoneType' has no len()
    ----------------------------------------
    Command "python setup.py egg_info" failed with error code 1 in 
    c:usersuser-a~1appdatalocaltemppip-install-oro1ovrobotframework- 
    autoitlibrary

我目前安装的python软件包及其版本是:

Pillow==5.3.0
Pygments==2.3.1
pypiwin32==223
Pypubsub==4.0.0
pywin32==224
robotframework==3.1
robotframework-ride==1.5.2.1
robotframework-selenium2library==3.0.0
robotframework-seleniumlibrary==3.3.0
selenium==3.141.0
six==1.12.0
typing==3.6.6
urllib3==1.24.1
wxPython==4.0.3

我已经尝试了这个命令:

pip install --upgrade setuptools

当输入回显 %HOMEDRIVE 时,输出为:

C:Userscmpeixoto>echo %HOMEDRIVE%
C:

感谢您的帮助,

该错误看起来像未设置环境变量HOMEDRIVE,即使它根据您的测试具有值(库安装程序使用它来复制某些文件)。

您可以尝试一下吗 - 手动设置它,然后立即运行pip - 在同一个命令提示符 (cmd) 会话中:

set HOMEDRIVE=C:
pip install -U robotframework-autoitlibrary --no-cache-dir --pre

相关内容

  • 没有找到相关文章

最新更新