天天看點

python 中無法導入日志包_Python setup.py install 後的包無法導入 - V2EX

本人試用 python 打包工具 setuptools

使用 python setup.py install 安裝本地建立的測試項目 topackage:

console 的日志如下:

running install

running bdist_egg

running egg_info

writing topackage.egg-info\PKG-INFO

writing dependency_links to topackage.egg-info\dependency_links.txt

writing top-level names to topackage.egg-info\top_level.txt

reading manifest file 'topackage.egg-info\SOURCES.txt'

reading manifest template 'MANIFEST.in'

writing manifest file 'topackage.egg-info\SOURCES.txt'

installing library code to build\bdist.win-amd64\egg

running install_lib

running build_py

creating build\bdist.win-amd64\egg

creating build\bdist.win-amd64\egg\pack

copying build\lib\pack\prt.py -> build\bdist.win-amd64\egg\pack

copying build\lib\pack_init_.py -> build\bdist.win-amd64\egg\pack

byte-compiling build\bdist.win-amd64\egg\pack\prt.py to prt.cpython-35.pyc

byte-compiling build\bdist.win-amd64\egg\pack_init_.py to init.cpython-35.pyc

creating build\bdist.win-amd64\egg\EGG-INFO

copying topackage.egg-info\PKG-INFO -> build\bdist.win-amd64\egg\EGG-INFO

copying topackage.egg-info\SOURCES.txt -> build\bdist.win-amd64\egg\EGG-INFO

copying topackage.egg-info\dependency_links.txt -> build\bdist.win-amd64\egg\EGG-INFO

copying topackage.egg-info\top_level.txt -> build\bdist.win-amd64\egg\EGG-INFO

zip_safe flag not set; analyzing archive contents...

creating 'dist\topackage-0.1-py3.5.egg' and adding 'build\bdist.win-amd64\egg' to it

removing 'build\bdist.win-amd64\egg' (and everything under it)

Processing topackage-0.1-py3.5.egg

Removing d:\python35\lib\site-packages\topackage-0.1-py3.5.egg

Copying topackage-0.1-py3.5.egg to d:\python35\lib\site-packages

topackage 0.1 is already the active version in easy-install.pth

Installed d:\python35\lib\site-packages\topackage-0.1-py3.5.egg

Processing dependencies for topackage==0.1

Finished processing dependencies for topackage==0.1

安裝完成後:

進入 python console 界面,輸入 import topackage ,提示 topackage 找不到..