beautifulsoup4-4.4.0在window下的编译安装

来源:互联网 发布:mysql date_format 编辑:程序博客网 时间:2024/06/05 17:26

1,编译:

E:\python\beautifulsoup4-4.4.0>python setup.py build

running build
running build_py
creating build
creating build\lib
creating build\lib\bs4
copying bs4\dammit.py -> build\lib\bs4
copying bs4\diagnose.py -> build\lib\bs4
copying bs4\element.py -> build\lib\bs4
copying bs4\testing.py -> build\lib\bs4
copying bs4\__init__.py -> build\lib\bs4
creating build\lib\bs4\builder
copying bs4\builder\_html5lib.py -> build\lib\bs4\builder
copying bs4\builder\_htmlparser.py -> build\lib\bs4\builder
copying bs4\builder\_lxml.py -> build\lib\bs4\builder
copying bs4\builder\__init__.py -> build\lib\bs4\builder
creating build\lib\bs4\tests
copying bs4\tests\test_builder_registry.py -> build\lib\bs4\tests
copying bs4\tests\test_docs.py -> build\lib\bs4\tests
copying bs4\tests\test_html5lib.py -> build\lib\bs4\tests
copying bs4\tests\test_htmlparser.py -> build\lib\bs4\tests
copying bs4\tests\test_lxml.py -> build\lib\bs4\tests
copying bs4\tests\test_soup.py -> build\lib\bs4\tests
copying bs4\tests\test_tree.py -> build\lib\bs4\tests
copying bs4\tests\__init__.py -> build\lib\bs4\tests

E:\python\beautifulsoup4-4.4.0>

2. 安装


E:\python\beautifulsoup4-4.4.0>python setup.py install
running install
running bdist_egg
running egg_info
writing requirements to beautifulsoup4.egg-info\requires.txt
writing beautifulsoup4.egg-info\PKG-INFO
writing top-level names to beautifulsoup4.egg-info\top_level.txt
writing dependency_links to beautifulsoup4.egg-info\dependency_links.txt
reading manifest file 'beautifulsoup4.egg-info\SOURCES.txt'
reading manifest template 'MANIFEST.in'
writing manifest file 'beautifulsoup4.egg-info\SOURCES.txt'
installing library code to build\bdist.win32\egg
running install_lib
running build_py
creating build\bdist.win32
creating build\bdist.win32\egg
creating build\bdist.win32\egg\bs4
creating build\bdist.win32\egg\bs4\builder
copying build\lib\bs4\builder\_html5lib.py -> build\bdist.win32\egg\bs4\builder
copying build\lib\bs4\builder\_htmlparser.py -> build\bdist.win32\egg\bs4\builder
copying build\lib\bs4\builder\_lxml.py -> build\bdist.win32\egg\bs4\builder
copying build\lib\bs4\builder\__init__.py -> build\bdist.win32\egg\bs4\builder
copying build\lib\bs4\dammit.py -> build\bdist.win32\egg\bs4
copying build\lib\bs4\diagnose.py -> build\bdist.win32\egg\bs4
copying build\lib\bs4\element.py -> build\bdist.win32\egg\bs4
copying build\lib\bs4\testing.py -> build\bdist.win32\egg\bs4
creating build\bdist.win32\egg\bs4\tests
copying build\lib\bs4\tests\test_builder_registry.py -> build\bdist.win32\egg\bs4\tests
copying build\lib\bs4\tests\test_docs.py -> build\bdist.win32\egg\bs4\tests
copying build\lib\bs4\tests\test_html5lib.py -> build\bdist.win32\egg\bs4\tests
copying build\lib\bs4\tests\test_htmlparser.py -> build\bdist.win32\egg\bs4\tests
copying build\lib\bs4\tests\test_lxml.py -> build\bdist.win32\egg\bs4\tests
copying build\lib\bs4\tests\test_soup.py -> build\bdist.win32\egg\bs4\tests
copying build\lib\bs4\tests\test_tree.py -> build\bdist.win32\egg\bs4\tests
copying build\lib\bs4\tests\__init__.py -> build\bdist.win32\egg\bs4\tests
copying build\lib\bs4\__init__.py -> build\bdist.win32\egg\bs4
byte-compiling build\bdist.win32\egg\bs4\builder\_html5lib.py to _html5lib.pyc
byte-compiling build\bdist.win32\egg\bs4\builder\_htmlparser.py to _htmlparser.pyc
byte-compiling build\bdist.win32\egg\bs4\builder\_lxml.py to _lxml.pyc
byte-compiling build\bdist.win32\egg\bs4\builder\__init__.py to __init__.pyc
byte-compiling build\bdist.win32\egg\bs4\dammit.py to dammit.pyc
byte-compiling build\bdist.win32\egg\bs4\diagnose.py to diagnose.pyc
byte-compiling build\bdist.win32\egg\bs4\element.py to element.pyc
byte-compiling build\bdist.win32\egg\bs4\testing.py to testing.pyc
byte-compiling build\bdist.win32\egg\bs4\tests\test_builder_registry.py to test_builder_registry.pyc
byte-compiling build\bdist.win32\egg\bs4\tests\test_docs.py to test_docs.pyc
byte-compiling build\bdist.win32\egg\bs4\tests\test_html5lib.py to test_html5lib.pyc
byte-compiling build\bdist.win32\egg\bs4\tests\test_htmlparser.py to test_htmlparser.pyc
byte-compiling build\bdist.win32\egg\bs4\tests\test_lxml.py to test_lxml.pyc
byte-compiling build\bdist.win32\egg\bs4\tests\test_soup.py to test_soup.pyc
byte-compiling build\bdist.win32\egg\bs4\tests\test_tree.py to test_tree.pyc
byte-compiling build\bdist.win32\egg\bs4\tests\__init__.py to __init__.pyc
byte-compiling build\bdist.win32\egg\bs4\__init__.py to __init__.pyc
creating build\bdist.win32\egg\EGG-INFO
copying beautifulsoup4.egg-info\PKG-INFO -> build\bdist.win32\egg\EGG-INFO
copying beautifulsoup4.egg-info\SOURCES.txt -> build\bdist.win32\egg\EGG-INFO
copying beautifulsoup4.egg-info\dependency_links.txt -> build\bdist.win32\egg\EGG-INFO
copying beautifulsoup4.egg-info\requires.txt -> build\bdist.win32\egg\EGG-INFO
copying beautifulsoup4.egg-info\top_level.txt -> build\bdist.win32\egg\EGG-INFO
zip_safe flag not set; analyzing archive contents...
creating dist
creating 'dist\beautifulsoup4-4.4.0-py2.7.egg' and adding 'build\bdist.win32\egg' to it
removing 'build\bdist.win32\egg' (and everything under it)
Processing beautifulsoup4-4.4.0-py2.7.egg
Copying beautifulsoup4-4.4.0-py2.7.egg to e:\anaconda\lib\site-packages
Adding beautifulsoup4 4.4.0 to easy-install.pth file

Installed e:\anaconda\lib\site-packages\beautifulsoup4-4.4.0-py2.7.egg
Processing dependencies for beautifulsoup4==4.4.0
Finished processing dependencies for beautifulsoup4==4.4.0

E:\python\beautifulsoup4-4.4.0>

3.关于pyc和egg文件

pyc文件:

pyc文件,是python编译后的字节码(bytecode)文件。只要运行了py文件,python编译器就会自动生成一个对应的pyc字节码文件。这个pyc字节码文件,经过python解释器,会生成机器码运行(这也是为什么pyc文件可以跨平台部署,类似于java的跨平台,java中JVM运行的字节码文件)。下次调用直接调用pyc,而不调用py文件。直到你这个py文件有改变。python解释器会检查pyc文件中的生成时间,对比py文件的修改时间,如果py更新,那么就生成新的pyc。

  • A program doesn't run any faster when it is read from a ‘.pyc’ or ‘.pyo’ file than when it is read from a ‘.py’ file; the only thing that's faster about ‘.pyc’ or ‘.pyo’files is the speed with which they are loaded.
  • When a script is run by giving its name on the command line, the bytecode for the script is never written to a ‘.pyc’ or ‘.pyo’ file. Thus, the startup time of a script may be reduced by moving most of its code to a module and having a small bootstrap script that imports that module. It is also possible to name a ‘.pyc’ or ‘.pyo’file directly on the command line. 在import 别的 py 文件时,那个 py 文件会被存一份 pyc加速下次装载。而主文件因为只需要装载一次就没有存 pyc
    egg文件:
        根据上面的install提示信息,egg文件应该类似于一个包文件,含有所有的pyc文件和信息文件。



  • 0 0
    原创粉丝点击