Skip to content

AttributeError: module 'pkg_resources' has no attribute 'declare_namespace' #115

@silmerusse

Description

@silmerusse

版本: 1.5.3

报错日志:
lib/python3.12/site-packages/lark_oapi/ws/pb/google/init.py", line 2, in
import('pkg_resources').declare_namespace(name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: module 'pkg_resources' has no attribute 'declare_namespace'

2026年开始Setuptools 81.0.0+ 删除了 pkg_resources.declare_namespace

临时解决方案:
pin setuptools版本:

setuptools<81

或者手工改下代码ws/pb/google/init.py

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions