Relative imports require the 'package' argument

前端 未结 5 1611
太阳男子
太阳男子 2021-02-07 01:44

I want to use Sphinx so it can automatically generate a pydoc for my python code but I\'m getting an error. What an I doing wrong?

conf.py sphinx config

5条回答
  •  难免孤独
    2021-02-07 01:53

    you need to add your project path to sys path just like

    sys.path.append("C:\\Users\\ogward\\STUDPROJ") 
    os.environ['DJANGO_SETTINGS_MODULE'] = '../cloud_server.settings'
     
    

提交回复
热议问题