遇到了个大坑,记录一下。浪费了大半天的时间搞这个bug,55555…
之前用的pycharm2017版,手欠更新到了2019版,结果不知怎么搞得连import numpy都会报错
如下:
import numpy as np
arr = np.arange(10)
print(arr)
报错:
D:\Anaconda\python.exe F:/python/Work/QA/demo/demo11_qa_keras_questionselect/keras_qa_based_question_selection-master/my_test.py
Fatal Python error: Py_Initialize: can't initialize sys standard streams
Traceback (most recent call last):
File "D:\Anaconda\lib\io.py", line 52, in <module>
File "F:\python\Work\QA\demo\demo11_qa_keras_questionselect\keras_qa_based_question_selection-master\abc.py", line 7, in <module>
ModuleNotFoundError: No module named 'numpy'
Process finished with exit code -1073740791 (0xC0000409)
具体解决方案:
1.首先看文件名是否为abc.py,如果是的化可能是文件名与模块名字冲突,所以会报错。改成其他看是否解决。
2.如果还没解决
选择Edit Configurations,然后进入下面的页面
这里取消两个 Add的√,然后OK
问题完美解决,哦耶!