2

我对狮身人面像有以下问题。我的项目结构是

|--project
   |--api
     |--__init__.py
     |--rpc.py
     |--v1
        |--__init__.py
        |--model.py
|--build
|--source
  |--conf.py
|--Makefile

在 conf.py 我有

import os
import sys
sys.path.insert(0, os.path.abspath('..'))

如果我跑

pipenv run sphinx-build ./source ./build

我收到以下错误:

WARNING: autodoc: failed to import module 'api.rpc'; the following exception was raised:
No module named 'api'
WARNING: autodoc: failed to import module 'api'; the following exception was raised:
No module named 'api'
WARNING: autodoc: failed to import module 'api.v1.model'; the following exception was raised:
No module named 'api'
WARNING: autodoc: failed to import module 'api.v1'; the following exception was raised:
No module named 'api'

哪里可能有问题?谢谢

4

0 回答 0