今天在pycharm中導入:import matplotlib.pyplot as plt時出現DLL not found,導入失敗,按照網上很多博主的方法說是在pycharm中安裝matplotlib,但是我的pycharm裏面已經有matplotlib了,而且我嘗試重新再pycharm安裝時卻找不到matplotlib包,目前的解決方法是配置環境變量,將以下的目錄加入path環境變量即可:
C:\Anaconda3
C:\Anaconda3\Scripts
C:\Anaconda3\Library\bin
按照提示點擊確定,配置完成後,重啓pycharm即可解決。注意:一定要重啓pycharm,否則新配置的環境變量不會反應到pycharm中。