zoukankan      html  css  js  c++  java
  • Python——各类库的安装(持续更新)

    一、BeautifulSoup

    说明:www.crummy.com:Beautiful Soup 3只能在python2.x版本中运行,而Beautiful Soup 4还可以在python3.x版本中运行.Beautiful Soup 4速度更快,特性更多,而且与第三方的文档解析库(如lxml和html5lib)协同工作。

    方法1、在cmd窗口下,输入:

    > pip install beautifulsoup4

    即可完成下载。

    方法2、https://www.crummy.com/software/BeautifulSoup/bs4/download/下下载源代码,解压后进入文件,执行:

    >python setup.py install

    安装完成后,在IDLE中输入:

    >>>from bs4 import BeautifulSoup

    即可使用。

    注意:BeautifulSoup中B和S的大写。


    二、urllib2 

    python 3.X版本不需要安装urllib2,urllib和urllib2包集合成在一个包,且为自带,原urllib2内容在urllib.request库中调用 。调用按如下规则:

    import urllib.request
    resp = urllib.request.urlopen("http://www.baidu.com";)

    、 Pillow,即PIL

    在cmd窗口下,输入:

    > pip install Pillow

    即可完成下载。

    运行:

    from PIL import Image

    、 Xlrd

    > pip install xlrd
    import xlrd

     五、scipy

    1、安装numpy;

    2、安装wheel;pip install wheel

    3、scipy下载地址,找到合适自己的版本下载完成;

    4、使用命令提示符进入下载目录,运行:pip install scipy-1.0.0rc2-cp36-cp36m-win_amd64.whl

    5、安装完成后,可输入:python,然后输入:import scipy检查是否安装成功。

    六、pytesseract

    CMD:

    pip install pytesseract

    七、tesseract-ocr

  • 相关阅读:
    多线程常见面试题
    Redis常见面试题总结
    ehcache缓存技术的特性
    sar 命令详解
    面试题
    BOOTPROTO=[none|static|bootp|dhcp](引导时不使用协议|静态分配|BOOTP协议|DHCP协议)
    课后习题-10
    ulimit 命令详解
    课后习题-9
    netstat 命令详解
  • 原文地址:https://www.cnblogs.com/shadrach/p/7465151.html
Copyright © 2011-2022 走看看