Carlos Peixoto
Carlos Peixoto

Reputation: 61

Error installing AutoitLibrary through command line

I need to install robotframework-autoitlibrary to use on my test cases. My problem is when I try to install AutoIt Library through command line with the following command:

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

I have this error:

  C:\windows\system32>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:\users\user-a~1\appdata\local\temp\pip-install- 
    oro1ov\robotframework-autoitlibrary\setup.py", line 93, in <module>
        destPath = os.path.normpath(os.path.join(os.getenv("HOMEDRIVE"), 
    r"\RobotFramework\Extensions\AutoItLibrary"))
      File "c:\python27\lib\ntpath.py", line 65, in join
        result_drive, result_path = splitdrive(path)
      File "c:\python27\lib\ntpath.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:\users\user-a~1\appdata\local\temp\pip-install-oro1ov\robotframework- 
    autoitlibrary\

My currently installed python packages and their versions are:

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

I already try this command:

pip install --upgrade setuptools

When input echo %HOMEDRIVE%, the output is:

C:\Users\cmpeixoto>echo %HOMEDRIVE%
C:

Thanks for your help,

Upvotes: 2

Views: 1780

Answers (1)

Todor Minakov
Todor Minakov

Reputation: 20067

The error looks like the environment variable HOMEDRIVE is not set, even though it has a value according to your test (the library installer uses it to copy some files).

Can you try this - manually set it, and straight after that run the pip - in the same Command Prompt (cmd) session:

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

Upvotes: 3

Related Questions