First, the use PyCharm software installation package pandas
1, open PyCharm
2, top right, click "Files" → "Settings ..."
3, pop-up "Settings" window, select "Project: Projects" → "Project Interpreter", right click on the "+" (plus sign).
4, third-party libraries into the search interface (Available Packages window), in the library or module search input field you want to install (here pandas), select "pandas" → click the bottom left of the "Install Packages".
Until the installation is complete, the library display font color turns blue, and set out on a screen installed library.
Two, CMD command module mounted pandas
Open a command prompt, enter the command pip install pandas
C:\Users\izheng> pip install pandas Requirement already satisfied: pandas in d:\program files (x86)\anaconda3\lib\site-packages Requirement already satisfied: python-dateutil>=2 in d:\program files (x86)\anaconda3\lib\site-packages (from pandas) Requirement already satisfied: pytz>=2011k in d:\program files (x86)\anaconda3\lib\site-packages (from pandas) Requirement already satisfied: numpy>=1.9.0 in d:\program files (x86)\anaconda3\lib\site-packages (from pandas) Requirement already satisfied: six>=1.5 in d:\program files (x86)\anaconda3\lib\site-packages (from python-dateutil>=2->pandas) You are using pip version 9.0.1, however version 19.3.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command.
如上显示,我们了解到 pip 版本太旧了。于是根据提示,需要更新pip 的版本:
升级 pip:
C:\Users\izheng> python -m pip install --upgrade pip Requirement already up-to-date: pip in e:\program files\python3.6.5\lib\site-packages (19.3.1)
从中我们了解到,pip 的最新版本已安装。
我们来检查一下 pip 的版本:
C:\Users\izheng> pip -V pip 9.0.1 from D:\Program Files (x86)\Anaconda3\lib\site-packages (python 3.6) C:\Users\izheng> pip3 -V pip 19.3.1 from e:\program files\python3.6.5\lib\site-packages\pip (python 3.6)
结果发现:pip-9.0.1 是用在 Anaconda 上,python3.6 用的最新版pip3。
所以,这里我们用 pip3 命令来安装 pandas 就没有问题了。
注意:在使用 pip 命令安装Package时,先检查下 pip 的版本是否正确。到底是使用 pip 命令还是 pip3 命令。