1,numpy(基础数值算法) 安装,要是在PyCharm Community中run会报错,
ModuleNotFoundError: No module named 'numpy'
方法一:
(1)在pycharm中左上角 file->settings下找到Project Interpreter,这个时候点击右上角的+,在图中这个位置
搜索【numpy】然后安装Install Package 如图
方法二:这种问题的原因是pycharm所使用的解释器并不是已经安装的python3.7,而是自带了python.exe解释器,并且只有两个模块pip和setuptools,这样一来许多第三方库就无法在pycharm中使用。这时候只需要在PyCharmsettings( File->settings->project:当前项目名->Project Interpreter)中设置一下Interpreter就可以了。如下图所示,将其设置为Anaconda3
按照下图配置。程序可以正常运行了
实验程序运行如下
2,matplotlib(数据可视化)安装
报如图所示错误
E:\test_charm\venv\Scripts\python.exe E:/test_charm/venv/test.py
Traceback (most recent call last):
File "E:/test_charm/venv/test.py", line 1, in <module>
import matplotlib as ms
ModuleNotFoundError: No module named 'matplotlib'
Process finished with exit code 1
搜索matplotlib,安装Install Package
3,同理scipy,pandas,sklearn,ipynb模块的安装
分别搜索scipy,pandas,sklearn,ipynb,安装Install Package