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

  • 相关阅读:
    linux通过源码安装nodejs
    设置npm的镜像源
    ubuntu手动安装PhantomJS
    h2数据库的简单使用
    xampp启动失败 Apache shutdown unexpectedly
    phpqrcode实现二维码(含图片)
    php 使用 rabbitmq
    rabbitMQ linux安装
    rabbitmq的web管理界面无法使用guest用户登录
    linux安装使用xdebug
  • 原文地址:https://www.cnblogs.com/shadrach/p/7465151.html
Copyright © 2011-2022 走看看