安装robotframewrok 的ssh库 pip install robotframework-sshlibrary 遇到 error: Unable to find vcvarsall.bat

 error: Unable to find vcvarsall.bat

依照

https://github.com/robotframework/SSHLibrary


1. 先安装 pip

download pip-6.0.8.zip from  https://github.com/pypa/pip/releases  to a dir for example( C:\Python27\download)
unzip it and cd the dir(C:\Python27\download\pip-6.0.8)
python setup.py install
C: \>cd C:\Python27\download\pip -6.0.8
C: \Python27\download \pip -6.0.8> python setup.py install

2. 
cd c:\Python27\Scripts     (python本机的安装路径c:\Python27)

c:\Python27\Scripts>pip install robotframework-sshlibrary


    error: Unable to find vcvarsall.bat

    ----------------------------------------
    Command "C:\Python27\python.exe -c "import setuptools, tokenize;__file__='c
:\\users\\clchen\\appdata\\local\\temp\\pip-build-vc3qmm\\pycrypto\\setup.py';ex
ec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'
), __file__, 'exec'))" install --record c:\users\clchen\appdata\local\temp\pip-p
rkrxq-record\install-record.txt --single-version-externally-managed --compile" f
ailed with error code 1 in c:\users\clchen\appdata\local\temp\pip-build-vc3qmm\p
ycrypto

3. 认真看下,Notice that on Windows you should still install PyCrypto manually first.  on 

https://github.com/robotframework/SSHLibrary

于是到https://github.com/robotframework/SSHLibrary/blob/master/INSTALL.rst里面,找到了

PyCrypto安装包的下载地址:

http://www.voidspace.org.uk/python/modules.shtml#pycrypto

The PyCrypto 2.6 files are all bdist_wininst created with MS Visual Studio 2008 and 2010 (for 3.3). The binaries don't include MPIR / GMP _fastmath.

选择自己对应的python版本,32位or 64位的cpu, 我的对应的是

下载下来,先安装这个exe


然后:重新执行

cd c:\Python27\Scripts    (python本机的安装路径c:\Python27)

c:\Python27\Scripts>pip install robotframework-sshlibrary


sshlibrary 安装成功了


c:\Python27\Scripts>pip install robotframework-sshlibrary
Collecting robotframework-sshlibrary
  Using cached robotframework-sshlibrary-2.1.1.tar.gz
Requirement already satisfied (use --upgrade to upgrade): robotframework in d:\python278\lib\site-pa
ckages (from robotframework-sshlibrary)
Collecting paramiko>=1.8.0 (from robotframework-sshlibrary)
  Using cached paramiko-1.15.2-py2.py3-none-any.whl
Collecting ecdsa>=0.11 (from paramiko>=1.8.0->robotframework-sshlibrary)
  Using cached ecdsa-0.13-py2.py3-none-any.whl
Requirement already satisfied (use --upgrade to upgrade): pycrypto!=2.4,>=2.1 in d:\python278\lib\si
te-packages (from paramiko>=1.8.0->robotframework-sshlibrary)
Installing collected packages: ecdsa, paramiko, robotframework-sshlibrary

  Running setup.py install for robotframework-sshlibrary
Successfully installed ecdsa-0.13 paramiko-1.15.2 robotframework-sshlibrary-2.1.1


  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

youcharming

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值