lit*_*hen 1 python egg pip beautifulsoup
我使用命令pip install beautifulsoup4安装beautifulsoup,然而,在我尝试导入它后失败我发现了一些有趣的东西,只有egg-info文件夹但没有脚本文件夹,有人可以告诉我为什么以及如何解决这个问题?我知道我可以获取脚本并将其移动到sitepackages文件夹,我确实喜欢它并且它可以工作,但我觉得这是个坏主意.
安装beautifulsoup4时pip,您将按该名称安装分发.该.egg-info文件夹pip在安装时创建,该分发以分发命名(加上版本和python体系结构).
分发包含一个或多个包或模块,而这些被安装到site-packages文件夹旁边的.egg-info目录.这些包或模块的名称不一定与分发名称相对应.
对于BeautifulSoup 4,分发包含一个名为的包bs4.
你可以自己验证一下; 内部.egg-info目录是一个名为installed-files.txt,列出所有相关文件(使用相对路径):
$ cat lib/python2.7/site-packages/beautifulsoup4*.egg-info/installed-files.txt
../bs4/__init__.py
../bs4/dammit.py
../bs4/diagnose.py
../bs4/element.py
../bs4/testing.py
../bs4/builder/__init__.py
../bs4/builder/_html5lib.py
../bs4/builder/_htmlparser.py
../bs4/builder/_lxml.py
../bs4/tests/__init__.py
../bs4/tests/test_builder_registry.py
../bs4/tests/test_docs.py
../bs4/tests/test_html5lib.py
../bs4/tests/test_htmlparser.py
../bs4/tests/test_lxml.py
../bs4/tests/test_soup.py
../bs4/tests/test_tree.py
../bs4/__init__.pyc
../bs4/dammit.pyc
../bs4/diagnose.pyc
../bs4/element.pyc
../bs4/testing.pyc
../bs4/builder/__init__.pyc
../bs4/builder/_html5lib.pyc
../bs4/builder/_htmlparser.pyc
../bs4/builder/_lxml.pyc
../bs4/tests/__init__.pyc
../bs4/tests/test_builder_registry.pyc
../bs4/tests/test_docs.pyc
../bs4/tests/test_html5lib.pyc
../bs4/tests/test_htmlparser.pyc
../bs4/tests/test_lxml.pyc
../bs4/tests/test_soup.pyc
../bs4/tests/test_tree.pyc
./
dependency_links.txt
PKG-INFO
SOURCES.txt
top_level.txt
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
2445 次 |
| 最近记录: |