导入db包时出错
Opened this issue · 0 comments
102757017 commented
Traceback (most recent call last):
File "H:\学习资料\编程学习\python\基础操作\Cookie-Pool\web.py", line 11, in
from db.peeweetools import Cookies
ModuleNotFoundError: No module named 'db.peeweetools'
import db
help(db)
Help on package db:
NAME
db
PACKAGE CONTENTS
column
db
queries (package)
query_templates
s3
table
tests (package)
utils
FILE
d:\program files\winpython-64bit-3.6.1.0qt5\python-3.6.1.amd64\lib\site-packages\db_init_.py
确认了一下,错误原因是python自带了一个名称是db的模块,因此会优先导入这个包。