当我尝试使用 Python 3.5 运行 Sanic 应用程序时,我收到以下错误:
Traceback (most recent call last):
File "api.py", line 1, in <module>
from sanic import Sanic
File "/home/shiro/dev/unassociated/user-api/.venv/lib/python3.5/site-packages/sanic/__init__.py", line 1, in <module>
from sanic.app import Sanic
File "/home/shiro/dev/unassociated/user-api/.venv/lib/python3.5/site-packages/sanic/app.py", line 14, in <module>
from sanic.handlers import ErrorHandler
File "/home/shiro/dev/unassociated/user-api/.venv/lib/python3.5/site-packages/sanic/handlers.py", line 14, in <module>
from sanic.response import text, html
File "/home/shiro/dev/unassociated/user-api/.venv/lib/python3.5/site-packages/sanic/response.py", line 3, in <module>
from ujson import dumps as json_dumps
ImportError: /home/shiro/dev/unassociated/user-api/.venv/lib/python3.5/site-packages/ujson.cpython-35m-x86_64-linux-gnu.so: undefined symbol: Buffer_AppendShortHexUnchecked
它在使用命令创建的虚拟环境中运行virtualenv -ppython3.5 .venv --no-site-packages
我在gentoo上,但我重新编译了所有相关的包,我不知道如何解决这个问题。任何人都可以帮忙吗?