在win7环境下安装Robotframework

1.安装python:

https://www.python.org/download/releases/2.7.8/

python路径配置:

“我的电脑”-右键“属性”-高级系统设置-环境变量-(系统变量)新建--变量名:Path 变量值:;C:\Python27\;C:\Python27\Scripts

2.安装setuptools (python的套件管理)

https://pypi.python.org/pypi/setuptools

3.安装pip

第一种:

cmd进入doc界面;

在安装pip前,请确认win系统中已经安装好了python,和easy_install工具
>>python
>>easy_install

把目录切换到python的安装目录下的Script文件夹下,
>>cd \Python27
>>cd Scripts
>>easy_install pip

pip安装成功后,在cmd下执行pip
>>pip

第二种:

先将get-pip.py文件放在c:\\Python27目录下

如果没有get-pip.py文件,在c:\\Python27目录下创建这个文件并复制下面的内容:

#!/usr/bin/env python
#
# Hi There!
# You may be wondering what this giant blob of binary data here is, you might
# even be worried that we‘re up to something nefarious (good for you for being
# paranoid!). This is a base85 encoding of a zip file, this zip file contains
# an entire copy of pip.
#
# Pip is a thing that installs packages, pip itself is a package that someone
# might want to install, especially if they‘re looking to run this get-pip.py
# script. Pip has a lot of code to deal with the security of installing
# packages, various edge cases on various platforms, and other such sort of
# "tribal knowledge" that has been encoded in its code base. Because of this
# we basically include an entire copy of pip inside this blob. We do this
# because the alternatives are attempt to implement a "minipip" that probably
# doesn‘t do things correctly and has weird edge cases, or compress pip itself
# down into a single file.
#
# If you‘re wondering how this is created, it is using an invoke task located
# in tasks/generate.py called "installer". It can be invoked by using
# ``invoke generate.installer``.

import os.path
import pkgutil
import shutil
import sys
import struct
import tempfile

# Useful for very coarse version differentiation.
PY2 = sys.version_info[0] == 2
PY3 = sys.version_info[0] == 3

if PY3:
    iterbytes = iter
else:
    def iterbytes(buf):
        return (ord(byte) for byte in buf)

try:
    from base64 import b85decode
except ImportError:
    _b85alphabet = (b"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"
                    b"abcdefghijklmnopqrstuvwxyz!#$%&()*+-;<=>[email protected]^_`{|}~")

    def b85decode(b):
        _b85dec = [None] * 256
        for i, c in enumerate(iterbytes(_b85alphabet)):
            _b85dec[c] = i

        padding = (-len(b)) % 5
        b = b + b‘~‘ * padding
        out = []
        packI = struct.Struct(‘!I‘).pack
        for i in range(0, len(b), 5):
            chunk = b[i:i + 5]
            acc = 0
            try:
                for c in iterbytes(chunk):
                    acc = acc * 85 + _b85dec[c]
            except TypeError:
                for j, c in enumerate(iterbytes(chunk)):
                    if _b85dec[c] is None:
                        raise ValueError(
                            ‘bad base85 character at position %d‘ % (i + j)
                        )
                raise
            try:
                out.append(packI(acc))
            except struct.error:
                raise ValueError(‘base85 overflow in hunk starting at byte %d‘
                                 % i)

        result = b‘‘.join(out)
        if padding:
            result = result[:-padding]
        return result

def bootstrap(tmpdir=None):
    # Import pip so we can use it to install pip and maybe setuptools too
    import pip
    from pip.commands.install import InstallCommand
    from pip.req import InstallRequirement

    # Wrapper to provide default certificate with the lowest priority
    class CertInstallCommand(InstallCommand):
        def parse_args(self, args):
            # If cert isn‘t specified in config or environment, we provide our
            # own certificate through defaults.
            # This allows user to specify custom cert anywhere one likes:
            # config, environment variable or argv.
            if not self.parser.get_default_values().cert:
                self.parser.defaults["cert"] = cert_path  # calculated below
            return super(CertInstallCommand, self).parse_args(args)

    pip.commands_dict["install"] = CertInstallCommand

    implicit_pip = True
    implicit_setuptools = True
    implicit_wheel = True

    # Check if the user has requested us not to install setuptools
    if "--no-setuptools" in sys.argv or os.environ.get("PIP_NO_SETUPTOOLS"):
        args = [x for x in sys.argv[1:] if x != "--no-setuptools"]
        implicit_setuptools = False
    else:
        args = sys.argv[1:]

    # Check if the user has requested us not to install wheel
    if "--no-wheel" in args or os.environ.get("PIP_NO_WHEEL"):
        args = [x for x in args if x != "--no-wheel"]
        implicit_wheel = False

    # We only want to implicitly install setuptools and wheel if they don‘t
    # already exist on the target platform.
    if implicit_setuptools:
        try:
            import setuptools  # noqa
            implicit_setuptools = False
        except ImportError:
            pass
    if implicit_wheel:
        try:
            import wheel  # noqa
            implicit_wheel = False
        except ImportError:
            pass

    # We want to support people passing things like ‘pip<8‘ to get-pip.py which
    # will let them install a specific version. However because of the dreaded
    # DoubleRequirement error if any of the args look like they might be a
    # specific for one of our packages, then we‘ll turn off the implicit
    # install of them.
    for arg in args:
        try:
            req = InstallRequirement.from_line(arg)
        except:
            continue

        if implicit_pip and req.name == "pip":
            implicit_pip = False
        elif implicit_setuptools and req.name == "setuptools":
            implicit_setuptools = False
        elif implicit_wheel and req.name == "wheel":
            implicit_wheel = False

    # Add any implicit installations to the end of our args
    if implicit_pip:
        args += ["pip"]
    if implicit_setuptools:
        args += ["setuptools"]
    if implicit_wheel:
        args += ["wheel"]

    delete_tmpdir = False
    try:
        # Create a temporary directory to act as a working directory if we were
        # not given one.
        if tmpdir is None:
            tmpdir = tempfile.mkdtemp()
            delete_tmpdir = True

        # We need to extract the SSL certificates from requests so that they
        # can be passed to --cert
        cert_path = os.path.join(tmpdir, "cacert.pem")
        with open(cert_path, "wb") as cert:
            cert.write(pkgutil.get_data("pip._vendor.requests", "cacert.pem"))

        # Execute the included pip and use it to install the latest pip and
        # setuptools from PyPI
        sys.exit(pip.main(["install", "--upgrade"] + args))
    finally:
        # Remove our temporary directory
        if delete_tmpdir and tmpdir:
            shutil.rmtree(tmpdir, ignore_errors=True)

def main():
    tmpdir = None
    try:
        # Create a temporary working directory
        tmpdir = tempfile.mkdtemp()

        # Unpack the zipfile into the temporary directory
        pip_zip = os.path.join(tmpdir, "pip.zip")
        with open(pip_zip, "wb") as fp:
            fp.write(b85decode(DATA.replace(b"\n", b"")))

        # Add the zipfile to sys.path so that we can import it
        sys.path.insert(0, pip_zip)

        # Run the bootstrap
        bootstrap(tmpdir=tmpdir)
    finally:
        # Clean up our temporary working directory
        if tmpdir:
            shutil.rmtree(tmpdir, ignore_errors=True)

if __name__ == "__main__":
    main()

cmd进入doc界面;

依次输入列下命令:
>>cd c:\
>>Python27\get-pip.py

pip安装成功后,在cmd下执行pip
>>pip

(建议用pip安装)

使用源码安装方式:

# 例如安装pymysql

1.先下载并解压pymysql文件

2.运行cmd

3.切换到pymysql目录下,执行源码:python setup.py install

4.安装robotframework

1.pip install robotframework
2.源码:python setup.py install

5.下载并安装wxPython

https://wxpython.org/download.php#stable

6.安装robotframework-ride

1.pip install robotframework-ride
2.源码:python setup.py install 

7.安装selenium2library

1.pip install robotframework-selenium2library
2.源码:python setup.py install 

8.下载并安装cx_Oracle (连接Oracle的库,不一定要装)

https://sourceforge.net/projects/cx-oracle/files/

9.安装databaselibrary

1.pip install robotframework-databaselibrary 2.源码:python setup.py install 

10.安装requests

1.pip install requests

11.安装RequestLibrary (http request库)

1. pip install -U robotframework-requests

12.安装pymysql (连接mysql的库)

1. pip install PyMySQL2.源码:python setup.py install 

查看安装的资源

1. pip list

卸载robotframework

1. pip uninstall robotframework

安装robotframework2.8.5

1. pip install robotframework==2.8.5

复制浏览器驱动程序到python27目录下

时间: 2024-10-25 10:27:20

在win7环境下安装Robotframework的相关文章

在Win7环境下安装启动Linux

在Win7系统下,安装启动Linux特别的不方便,因为XP下的boot.ini配置文件不在了,要添加一下启动选项的话, 只能使用专门的工具,这或多或少给人带来不爽的感觉,,, 其实Win7下虽然没有了boot.ini文件,但是在C盘目录下的boot.ini文件,同样还是可以添加系统的启动选项的,这让我们又可以脱离专门的配置工具,手动的设置grub4dos,然后启动安装linux,ubuntu了. 首先去网上下载grub4dos这个软件包,然后把"grldr","grldr.m

win7环境下安装运行gotour【转载整理】

最近尝试学习golang,在某个网站(真忘了)上发现gotour是一款灰常叼的教程&指南,之后搜索发现有前辈给出了本地安装离线gotour的方法,但实际安装过程中发现一些问题: 1.通过go get bitbucket.org/mikespook/go-tour-zh/gotour命令安装时报错,提示missing Mercurial command,原来是先需要安装Mercurial: 2.顺利用以上命令安装成功后,原贴说直接运行gotour命令即可通过http://127.0.0.1:399

在win7环境下安装python2.6.6

Python2.x与3.x语法并不相同,这里装的是2.6.6的版本. 1.下载Python2.6.6: https://www.python.org/downloads/ 根据自身计算机的特点选择Python2.6.6.msi安装-x86与x64 2.新增两环境变量: control panel-->System and Security-->System-->Advanced System Settings-->Advanced-->Environment Variable

win7环境下安装MongoDB

1.从http://www.mongodb.org/downloads获取,下载适合windows版本的mongodb,注意32位和64位的区别2.将下载的zip版本,解压到D:/mongodb3.创建数据库文件的存放位置.系统默认的位置是C:/data/db,可以在启动的时候,通过参数--dbpath 来修改文件夹路径.如D:/mongodb/data/db.需要注意的是,这个文件夹需要手动创建,若文件夹不存在,则mongodb不能正常启动.4.打开cmd命令行,启动mongodb服务D:/m

kettle8.3 win7环境下安装的注意点

kettle的安装很简单,到官网下载解压即可.只是启动时可能碰到一些问题,需要注意一下: 1. 启动时执行Spoon.bat一闪而退 #需要编辑Spoon.bat,在其中找到该行,根据自己机器配置进行内存大小的调整 if "%PENTAHO_DI_JAVA_OPTIONS%"=="" set PENTAHO_DI_JAVA_OPTIONS="-Xms1024m" "-Xmx2048m" "-XX:MaxPermSiz

Win7+vs2010下安装boost_1_46_1库

一.boost库分类: (1)不需要编译库:any.array.asio.conversion.crc.bind/mem_fn.enable_if.function.lambda.mpl.smart_ptr... (2)需要编译的库:date_time.filesystem.function_types.graph.iostreams.math.mpi.program_options.python.regex.serialization.signals.system.test.thread.wa

Win7环境下Web服务器的搭建和常见问题的处理

摘要:随着计算机技术的发展,学校和家庭用机很多都更新配置了Win7系统,如何在此环境下搭建Web服务器?该文根据多年的教学经验,总结了在Win7环境下动态网站Web服务器的搭建和常见问题的处理. 关键词:Web服务器;Win7系统;常见问题 Web服务器也称为WWW服务器,主要功能是提供网上信息浏览服务.Web服务器不仅能够存储信息,还能使用户在通过Web浏览器提供的信息的基础上运行脚本和程序. 静态网站是指网站的内容“固定不变”,当用户浏览器通过互联网HTTP协议向Web服务器请求提供网页内容

Ubuntu14(64位) 集群环境下安装Hadoop2.4

经过前边的积累,今天终于实现了集群环境下部署Hadoop,并成功运行了官方的例子. 工作如下: 两台机器: NameNode:上网小本,3G内存,机器名:YP-X100e,IP:192.168.101.130. DataNode:虚拟机,Win7下载VMWare10中虚拟Ubuntu14,虚拟机器名:ph-v370,IP:192.168.101.110 确保可互相ping通,按照机器名和IP配置各自机器的/etc/hosts文件和/etc/hostname文件,我的hosts配置内容如下 127

win7环境下苍南社保网上申报vpn设置

同事反馈在win7环境下,苍南社保网上申报的安装程序不能安装并连接到苍南社保的内部网上上申报相关信息. 同事也把相关的资料发给了我,大致了解了下,在xp下运行方式,通过vpn拨号的服务器,然后打开服务器上的地址就可以了. 整理下win7肯定也可以,只是自动安装拨号的软件无法运行,显示配置的文件不是为此处理器架构而设置,所以决定手工配置vpn相关信息.后测试正常.现总结如下: 在win7下新建vpn连接,默认设置,直到完成 vpn服务器地址202.96.97.240 修改安全选项相关设置,vpn类