Django和authomatic:ImportError:无法导入名称“six”
以下是我所做的步骤: cd[Mydjango项目] git克隆git://github.com/peterhudec/authomatic.git 在我的视图中,刚刚添加了以下行:从authomatic导入authomatic 我的项目树如下所示:Django和authomatic:ImportError:无法导入名称“six”,django,Django,以下是我所做的步骤: cd[Mydjango项目] git克隆git://github.com/peterhudec/authomatic.git 在我的视图中,刚刚添加了以下行:从authomatic导入authomatic 我的项目树如下所示: ├── authomatic │ ├── assets │ ├── authomatic │ ├── doc │ ├── examples │ ├── javascript │ └── tests ├── locale │
├── authomatic
│ ├── assets
│ ├── authomatic
│ ├── doc
│ ├── examples
│ ├── javascript
│ └── tests
├── locale
│ ├── en
│ ├── fr
│ └── sv
├── produits
│ ├── migrations
│ └── templatetags
├── pyweb
├── static
│ ├── css
│ ├── fonts
│ ├── images
│ ├── js
│ └── produits
└── templates
└── produits
问题出现在[mydjangoproject]/authomatic/authomatic/_init__.py第21行,代码如下:
from . import six
当然,我已经仔细检查了文件是否存在:
>cd [mydjangoproject]/authomatic/authomatic/
>find .
.
./adapters.py
./core.py
./exceptions.py
...blabla...
./six.py
./__init__.py
奇怪的是,在Pycharm中,如果我按ctrl键,点击句子中的六个。在文件u_init__;.py中导入六个,Pycharm将找到它并显示六个.py文件
我想它应该有用。。。知道发生了什么吗?这有点老套,但我已经在settings.py文件中手动添加了所有路径,如下所示:
sys.path.append('./third_party/defusedxml-0.4.1')
sys.path.append('./third_party/python3-openid')
sys.path.append('./third_party/authomatic_0_1_0')
这似乎奏效了。现在我面临的事实是,google app engine不支持Python 3,对于一家声称拥有最先进技术的公司来说,这是我无法理解的。是不是,来自authomatic import six?