- 此问题在此处已有答案**:
Invalid syntax (SyntaxError) in except handler when using comma(5个答案)
6小时前关门了。
到目前为止,我一直使用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
1条答案
按热度按时间3yhwsihp1#
你似乎有一个非常老的Django版本,你所显示的文件与Python 3不兼容;但是Django已经有三个版本支持Python 3了,你应该升级到最新的版本,1.9。