Pycharm 項目運行錯誤問題整理

以下錯誤發生在拷了別的項目在自己電腦上運行的出錯信息:

一、ImportError: No module named matplotlib.pyplot

意思缺少 matplotlib庫, 可以點擊Python -> preference -> Project Interpreter

下面的箭頭是添加缺少的第三方庫 上面的箭頭選擇對應的Project Interpreter.

File -> default setting 裏也有個project interpreter選項。在最右邊的箭頭,選擇對應項目的interpreter.

打開的項目多的話 會有多個project interpreter

二、Cannot set up a python SDK at Python 2.7 .The SDK seems invalid.

在edit configurations…下面的 還有個python interpreter,也要選對。

三、終端進行 pip instasll 報錯

報錯信息:

Could not install packages due to an EnvironmentError:
Consider using the `--user` option or check the permissions.

例如:pip install average 提示的報錯如下:

用上面綠框的方法重裝可以解決問題。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章