python 关于readthedocs本地服务器安装步骤中的错误

cld4siwp  于 2023-01-04  发布在  Python
关注(0)|答案(1)|浏览(208)

我正在尝试在我的本地gitlab服务器上安装readthedocs,我正在按照链接中的指南操作。
ReadThedocs Guide
这是我使用的python版本和pip版本;

Python3.9 
Pip3.9

要运行虚拟pip环境,我使用以下命令。

python3.9 -m venv tutorial-env  # I completed the install process with this command. 

source tutorial-env/bin/activate # with this command I access the virtual pip environment

我在虚拟PIP环境中的步骤;
我从readthedocs安装步骤运行这个。

(tutorial-env) [redhat@gitlab tutorial-env]$ pip install -r requirements.txt

并且没有发生错误。

(tutorial-env) [redhat@gitlab tutorial-env]$ python3.9 /home/redhat/readthedocs.org/manage.py migrate

给出以下错误消息

[debug    ] Using slumber v2.              [readthedocs.api.v2.client] api_host=http://127.0.0.1:8000 username=test

Traceback (most recent call last):

  File "/home/redhat/readthedocs.org/manage.py", line 11, in <module>

    execute_from_command_line(sys.argv)

  File "/home/redhat/tutorial-env/lib64/python3.9/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line

    utility.execute()

  File "/home/redhat/tutorial-env/lib64/python3.9/site-packages/django/core/management/__init__.py", line 395, in execute

    django.setup()

  File "/home/redhat/tutorial-env/lib64/python3.9/site-packages/django/__init__.py", line 24, in setup

    apps.populate(settings.INSTALLED_APPS)

  File "/home/redhat/tutorial-env/lib64/python3.9/site-packages/django/apps/registry.py", line 122, in populate

    app_config.ready()

  File "/home/redhat/readthedocs.org/readthedocs/core/apps.py", line 15, in ready

    import readthedocs.core.signals  # noqa

  File "/home/redhat/readthedocs.org/readthedocs/core/signals.py", line 17, in <module>

    from readthedocs.core.unresolver import unresolve

  File "/home/redhat/readthedocs.org/readthedocs/core/unresolver.py", line 16, in <module>

    @dataclass(slots=True)

TypeError: dataclass() got an unexpected keyword argument 'slots'

但是,当我在pip虚拟环境中运行python manage.py migrate命令时,我得到了下面的错误消息,并且无法完成安装过程,这个问题到底指向什么?
谢谢你的支持。
我没有尝试任何解决方案,因为我不知道是什么导致了这个问题。

0h4hbjxa

0h4hbjxa1#

您正在关注一个过时的非官方文档“阅读文档”(https://read-the-docs.readthedocs.io/en/latest/install.html)。官方指南更新了很多,现在使用Docker,更容易设置。请阅读官方指南https://docs.readthedocs.io/en/latest/development/install.html

相关问题