调试python代码时出现Intellij错误

时间:2017-05-17 00:34:02

标签: python intellij-idea intellij-14

str = "abc"
print len(str)

我正在尝试在intellij中执行上面的python程序。我能够“运行”该程序,但在尝试以调试模式运行它时出现异常。这是例外。我该如何解决这个问题?

/Users/sshil/anaconda/bin/python "/Users/sshil/Library/Application Support/IntelliJIdea2017.1/python/helpers/pydev/pydevd.py" --multiproc --qt-support --client 127.0.0.1 --port 54544 --file 
/Users/sshil/Downloads/Top-master/Top/DSPython/array/LargestSumContiguousIncreasingArray.py
Traceback (most recent call last):
File "/Users/sshil/Library/Application Support/IntelliJIdea2017.1/python/helpers/pydev/pydevd.py", line 13, in <module>
from _pydevd_bundle.pydevd_constants import IS_JYTH_LESS25, IS_PY3K, IS_PY34_OLDER, get_thread_id, dict_keys, dict_contains, \
File "/Users/sshil/Library/Application Support/IntelliJIdea2017.1/python/helpers/pydev/_pydevd_bundle/pydevd_constants.py", line 143, in <module>
from _pydev_imps._pydev_saved_modules import thread
File "/Users/sshil/Library/Application Support/IntelliJIdea2017.1/python/helpers/pydev/_pydev_imps/_pydev_saved_modules.py", line 15, in <module>
import xmlrpclib
File "/Users/sshil/anaconda/lib/python2.7/xmlrpclib.py", line 145, in <module>
import httplib
File "/Users/sshil/anaconda/lib/python2.7/httplib.py", line 69, in <module>
from array import array
ImportError: cannot import name array

0 个答案:

没有答案