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/

  • 相关阅读:
    ubuntu 16.04 更新后搜狗输入法无法输入中文的问题
    转: 苹果APNS的说明
    转:svn 更新指定文件夹
    转: Java 应用一般架构
    【原创】关于bug反正出现的问题可能
    App开发者博客之: 包建强 (专注移动app开发)
    转: 阿里跨平台移动开发工具Weex
    【原创】存储层设计的一些方法论
    转:车牌的自动截取与识别方案
    转: java web demo的示例
  • 原文地址:https://www.cnblogs.com/kaola8023/p/8566670.html
Copyright © 2011-2022 走看看