【发布时间】:2019-10-14 19:20:23
【问题描述】:
我正在尝试使用graphene-django,但“六”包存在一些问题。已经安装了,不过是作为自己的包安装的,graphene-django 好像在django.utils下面期待它
File "C:\Users\mjnic\.virtualenvs\phoenix-demo-C42C_PgQ\lib\site-packages\graphene_django\settings.py", line 18, in <module>
from django.utils import six
ImportError: cannot import name 'six' from 'django.utils' (C:\Users\mjnic\.virtualenvs\phoenix-demo-C42C_PgQ\lib\site-packages\django\utils\__init__.py)
六人之路:
>>> import six
>>> print(six.__file__)
C:\Users\mjnic\.virtualenvs\phoenix-demo-C42C_PgQ\lib\site-packages\six.py
我检查了graphene_django 的来源,在settings.py 中,它似乎专门针对django 路径。
This module provides the `graphene_settings` object, that is used to access
Graphene settings, checking for user settings first, then falling
back to the defaults.
"""
from __future__ import unicode_literals
from django.conf import settings
from django.test.signals import setting_changed
from django.utils import six
我正在使用 pipenv 来管理我的环境,并且我已经卸载并重新安装了六个,并且现在多次尝试解决各种石墨烯包,但无济于事。
那么我该如何移动six 的安装,使其位于django.utils.six,或者更改设置,以便graphene-django 正在查看当前安装的位置(看起来不可能查看资源)?
【问题讨论】:
标签: django six graphene-django