当使用python3运行django项目或使用pip安装模块时,即使我的项目没有使用google appengine,我也会收到google-appengine错误。
运行pip3冻结时,我得到以下结果:
andrew@andrew:~/dev/quickistock$ pip3 freeze
Traceback (most recent call last):
File "/usr/bin/pip3", line 9, in <module>
from pip import main
File "/home/andrew/.local/lib/python3.5/site-packages/pip/__init__.py", line 26, in <module>
from pip.utils import get_installed_distributions, get_prog
File "/home/andrew/.local/lib/python3.5/site-packages/pip/utils/__init__.py", line 23, in <module>
from pip.locations import (
File "/home/andrew/.local/lib/python3.5/site-packages/pip/locations.py", line 10, in <module>
from distutils.command.install import install, SCHEME_KEYS # noqa
File "/usr/local/google-cloud-sdk/platform/google_appengine/lib/distutils/distutils/command/install.py", line 258
raise DistutilsOptionError, \
^
SyntaxError: invalid syntax
答案 0 :(得分:0)
文件usr/local/google-cloud-sdk/platform/google_appengine/lib/distutils/distutils/command/install.py
包含this之类的行,并且与python 2.1兼容。 注意即可。这不是官方的谷歌存储库,但它是准确的:
print "config vars:"
这意味着install.py
是一个python 2文件,你正在从python 3运行pip。它们之间可能存在一些不兼容性。