zoukankan      html  css  js  c++  java
  • 安装python

    安装python

    打开 Python官网,找到“Download”, 在其下拉菜单中选择自己的平台(Windows/Mac),一般的Linux平台已经自带的Python,所以不需要安装,通过打开“终端” ,输入“python”命令来验证。

    如果你是第一次接触Python,一定会迷惑Python为什么会提供Python2.x 和 Python3.x两个版本?那么,直接使用Python3.x的最新版本就好了。因为Python2.x预计到2020年不在维护。

    如果你是Windows平台用户,会遇到一个版本为什么会提供多种个下载链接。例如:

    • Python 3.6.1 - 2017-03-21
      • Download Windows x86 web-based installer
      • Download Windows x86 executable installer
      • Download Windows x86 embeddable zip file
      • Download Windows x86-64 web-based installer
      • Download Windows x86-64 executable installer
      • Download Windows x86-64 embeddable zip file
      • Download Windows help file

    x86 只支持32位的系统; x86-64 支持64位的系统。 web-based 在安装的过程中需要联网;executable 可执行文件(.exe)方式安装;embeddable zip file 嵌入式版本,可以集成到其它应用中。

    注意:在安装的过程中需要勾选:“Add Python 3.x to PATH” , 如果没有勾选,需要在安装完成之后,将Python的安装目录(如:C:Python36)添加到环境变量PATH下面。

    path=C:Python27;C:Python27Scripts;

     

    打开Windows命令提示符(cmd)/ Linux终端输入:

    C:Usersname>python
    Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 18:41:36) [MSC v.1900 64 bit (AMD64)] on win32
    Type "help", "copyright", "credits" or "license" for more information.
    >>>

    安装pip

    mac下安装pip十分简单,如下命令:

    sudo easy_install pip

    安装uiautomator

    首先,在Windows命令提示符(cmd)/ Linux终端输入:

    C:Users
    ame>pip
    
    Usage:
      pip <command> [options]
    
    Commands:
      install                     Install packages.
      download                    Download packages.
      uninstall                   Uninstall packages.
      freeze                      Output installed packages in requirements format.
      list                        List installed packages.
      show                        Show information about installed packages.
      check                       Verify installed packages have compatible dependencies.
    ……
    
    

    确保pip命令可用,如果提示“pip不是内部或外部命令”,需要将将pip的安装目录(如:C:Python36Scripts)添加到环境变量PATH下面。

    接下来通过pip命令安装uiautomator:

    C:Users
    ame> pip install uiautomator
    

     

    转自:http://www.testclass.net/selenium_python/install-selenium/

  • 相关阅读:
    修而未复:说说WebLogic那修不完的Java反序列化漏洞
    python 元字符
    Metasploit利用MS17-010漏洞
    使用PDF.JS在线查看PDF
    当SQL Server爱上Linux:AVAILABILITY_MODE 和 DataGuard 的实践差距
    __call__()方法
    绑定方法和非绑定方法对象
    前世今生:蚂蚁金服自研数据库OceanBase的道路与思考
    centos分配IP脚本--写的第一个shell脚本
    centos分配IP脚本--写的第一个shell脚本
  • 原文地址:https://www.cnblogs.com/kaola8023/p/8566670.html
Copyright © 2011-2022 走看看