问题重现:
安装anaconda后,在anaconda prompt中对pandas进行更新,但是在本地原有的python中没有安装pandas这个库。在jupyter notebook中导入pandas没有问题,但是在pycharm中导入报错:没有这个模块。
问题分析:
1.单纯的认为只是没有在本地pyhton环境下安装pandas
在pycharm的命令行中安装
pip install pandas
WARNING: Ignoring invalid distribution -umpy (e:\anaconda\lib\site-packages)
WARNING: Ignoring invalid distribution -umpy (e:\anaconda\lib\site-packages)
Requirement already satisfied: pandas in e:\anaconda\lib\site-packages (1.1.5)
Requirement already satisfied: pytz>=2017.2 in c:\users\卄青\appdata\roaming\python\python37\site-packages (from pandas)
(2021.1)
Requirement already satisfied: python-dateutil>=2.7.3 in c:\users\卄青\appdata\roaming\python\python37\site-packages (fro
m pandas) (2.8.1)
Requirement already satisfied: numpy>=1.15.4 in e:\anaconda\lib\site-packages (from pandas) (1.21.5)
Requirement already satisfied: six>=1.5 in e:\