gpt4 book ai didi

python-3.x - 属性错误 : module 'resource' has no attribute 'getpagesize'

转载 作者:行者123 更新时间:2023-12-05 06:27:11 28 4
gpt4 key购买 nike

我正在尝试使用 Tensorflow Object Detection API,我按照给定链接中提到的步骤操作 -

https://tensorflow-object-detection-api-tutorial.readthedocs.io/en/latest/install.html#tf-models-install

当我尝试通过 jupyter notebook 访问 Object Detection Jupyter Notebook 时

我面临以下异常

Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 7, in <module>
from notebook.notebookapp import main
File "/home/dinesh/.local/lib/python3.6/site-
packages/notebook/notebookapp.py", line 79, in <module>
from .base.handlers import Template404, RedirectWithParams
File "/home/dinesh/.local/lib/python3.6/site-
packages/notebook/base/handlers.py", line 32, in <module>
import prometheus_client
File "/home/dinesh/.local/lib/python3.6/site-
packages/prometheus_client/__init__.py", line 7, in <module>
from . import process_collector
File "/home/dinesh/.local/lib/python3.6/site-
packages/prometheus_client/process_collector.py", line 12, in <module>
_PAGESIZE = resource.getpagesize()
AttributeError: module 'resource' has no attribute 'getpagesize'

我正在使用

Python - 3.6.3

Jupyter - 1.0.0

我怎样才能克服这个异常?

最佳答案

遇到了类似的错误。我的项目包含模块(文件夹)

  • 模特
  • 资源(替换为资源)
  • 服务

所以我把资源模块的名字改成了resources(改成任意合适的模块名)

关于python-3.x - 属性错误 : module 'resource' has no attribute 'getpagesize' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55472095/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com