背景
Anaconda新建了tensorflow-gpu的環境,然後在Pycharm中
Settings-->Project Interpreter-->選擇對應的Anaconda3\envs\環境下的python.exe
導入成功,但是執行
import tensorflow as tf
出現報錯:
ImportError: DLL load failed
但是在Terminal下可以成功導入tensorflow,國內外的論壇看了個遍,方法都試了是,沒用。
解決方法
Run --> Edit Configurations --> Python Interpreter -->換上對應的python
問題解決。