到目前为止,我已经使用pyCharm IDE工具构建Web应用程序。
我将使用neo4j作为图形数据库。所以我安装了neo4django。
之后我遇到了这个错误。我遇到了非常危急的情况。
有什么问题?我该如何解决这个问题?
bash -cl "/Library/Frameworks/Python.framework/Versions/3.5/bin/python3.5 /Applications/PyCharm.app/Contents/helpers/pycharm/django_manage.py makemigrations /Users/sangwonlee/MW_Service_Dev"
Traceback (most recent call last):
File "/Applications/PyCharm.app/Contents/helpers/pycharm/django_manage.py", line 41, in <module>
run_module(manage_file, None, '__main__', True)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 182, in run_module
return _run_module_code(code, init_globals, run_name, mod_spec)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 96, in _run_module_code
mod_name, mod_spec, pkg_name, script_name)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Users/sangwonlee/MW_Service_Dev/manage.py", line 8, in <module>
from django.core.management import execute_from_command_line
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/django/core/management/__init__.py", line 54
except ImportError,e:
^
SyntaxError: invalid syntax
Process finished with exit code 1
答案 0 :(得分:2)
你似乎有一个非常古老的Django版本。您显示的文件与Python 3不兼容;但是Django现在支持Python 3三个版本。您应该将Django升级到最新版本1.9。