我正在尝试使用PyCharm对python文件(例如this)进行逐步调试,并且遇到了以下问题
Connected to pydev debugger (build 181.4892.64)
Traceback (most recent call last):
File "/Users/aravidas/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-C/ch-0/181.4892.64/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1664, in <module>
main()
File "/Users/aravidas/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-C/ch-0/181.4892.64/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "/Users/aravidas/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-C/ch-0/181.4892.64/PyCharm CE.app/Contents/helpers/pydev/pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "/Users/aravidas/Library/Application Support/JetBrains/Toolbox/apps/PyCharm-C/ch-0/181.4892.64/PyCharm CE.app/Contents/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "/Users/aravidas/Documents/Github/yt8m/temp-youtube-8m/train.py", line 20, in <module>
import eval_util
File "/Users/aravidas/Documents/Github/yt8m/temp-youtube-8m/eval_util.py", line 15, in <module>
import average_precision_calculator as ap_calculator
File "/Users/aravidas/Documents/Github/yt8m/temp-youtube-8m/average_precision_calculator.py", line 57, in <module>
import numpy
ModuleNotFoundError: No module named 'numpy'
答案 0 :(得分:0)
我必须进入运行/调试配置,然后取消选中然后重新选中“将内容根添加到PYTHONPATH”和“将源根添加到PYTHONPATH”