3

我有软件包版本

...
Flask               2.0.2
Flask-GraphQL       2.0.0
Flask-Script        2.0.6
...
graphene            3.0
graphql-core        3.1.6
graphql-relay       3.1.0
graphql-server-core 1.1.1
...

import flask_graphql我得到

Traceback (most recent call last):
  File "/Users/Rax/Documents/Projects/Web/Sites/proj/_foo.py", line 1, in <module>
    import flask_graphql
  File "/Users/Rax/Documents/Projects/Coding/Python/venvs/proj/lib/python3.9/site-packages/flask_graphql/__init__.py", line 1, in <module>
    from .blueprint import GraphQL
  File "/Users/Rax/Documents/Projects/Coding/Python/venvs/proj/lib/python3.9/site-packages/flask_graphql/blueprint.py", line 5, in <module>
    from .graphqlview import GraphQLView
  File "/Users/Rax/Documents/Projects/Coding/Python/venvs/proj/lib/python3.9/site-packages/flask_graphql/graphqlview.py", line 7, in <module>
    from graphql_server import (HttpQueryError, default_format_error,
  File "/Users/Rax/Documents/Projects/Coding/Python/venvs/proj/lib/python3.9/site-packages/graphql_server/__init__.py", line 5, in <module>
    from graphql import get_default_backend
ImportError: cannot import name 'get_default_backend' from 'graphql' (/Users/Rax/Documents/Projects/Coding/Python/venvs/proj/lib/python3.9/site-packages/graphql/__init__.py)

我该如何避免这个错误。我应该需要不同的版本或版本范围吗?

4

0 回答 0