为Python3.9构建uwsgi插件在其工作的旧版本中失败。还有其他选择吗?

2024-06-12 23:57:14 发布

您现在位置:Python中文网/ 问答频道 /正文

我下载了最新的源代码uwsgi-2.0.19.1,并尝试构建一个uwsgi插件 但是每次都失败了。对于其他版本,如python3.6python3.8,它可以工作,我在其他Django项目中使用了它们。例如

它在这里工作:


命令:

[user@me /uwsgi-2.0.19.1] $ make PROFILE=nolang

[user@me /uwsgi-2.0.19.1] $ PYTHON=python3.6 ./uwsgi --build-plugin "plugins/python python36"

输出:

*** uWSGI building and linking plugin from plugins/python ***
[gcc -pthread] python36_plugin.so
build time: 5 seconds
*** python36 plugin built and available in python36_plugin.so ***

命令:

[user@me /uwsgi-2.0.19.1] $ PYTHON=python3.8 ./uwsgi --build-plugin "plugins/python python38"

输出:

*** uWSGI building and linking plugin from plugins/python ***
[gcc -pthread] python38_plugin.so
build time: 5 seconds
*** python38 plugin built and available in python38_plugin.so ***

此处失败:


“Datei Order Verzeichnis nicht gefunden”是德语,意思是“未找到文件或目录”

命令:

[user@me /uwsgi-2.0.19.1] $ PYTHON=python3.9 ./uwsgi --build-plugin "plugins/python python39"

输出单元:

*** uWSGI building and linking plugin from plugins/python ***
[gcc -pthread] python39_plugin.so
In file included from plugins/python/python_plugin.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/pyutils.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/pyloader.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/wsgi_handlers.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/wsgi_headers.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/wsgi_subhandler.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/web3_subhandler.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/pump_subhandler.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/gil.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/uwsgi_pymodule.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/profiler.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/symimporter.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/tracebacker.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
In file included from plugins/python/raw.c:1:
plugins/python/uwsgi_python.h:2:10: fatal error: Python.h: Datei oder Verzeichnis nicht gefunden
    2 | #include <Python.h>
      |          ^~~~~~~~~~
compilation terminated.
*** unable to build python39 plugin ***

问题:


  • 这是否意味着python3.9不受支持?在uWSGI文档中找不到任何内容,可能是我错过了
  • 我可以在某处下载python3.9的已构建插件吗?我不允许sudo apt install任何东西,因为我在共享服务器上

Tags: infromincludepluginserrorpluginuwsgifile