pandas - 在mac上成功安装后导入pandas的问题
问题描述
虽然看起来我的mac上已经成功安装了pandas
>sudo -H pip install --user pandas
DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting pandas
Downloading https://files.pythonhosted.org/packages/52/ff/912fe03a623a70bcf297d466013a0b4f4c68c3b60f86bf226682d061fc09/pandas-0.24.2-cp27-cp27m-macosx_10_6_intel.macosx_10_9_intel.macosx_10_9_x86_64.macosx_10_10_intel.macosx_10_10_x86_64.whl (16.7MB)
|################################| 16.7MB 1.7MB/s
Collecting python-dateutil>=2.5.0
Downloading https://files.pythonhosted.org/packages/d4/70/d60450c3dd48ef87586924207ae8907090de0b306af2bce5d134d78615cb/python_dateutil-2.8.1-py2.py3-none-any.whl (227kB)
|################################| 235kB 1.4MB/s
Collecting numpy>=1.12.0
Downloading https://files.pythonhosted.org/packages/09/96/84cf406fe7d589f3dba9fc0f737e65985a3526c6d8c783f02d4b5a10825d/numpy-1.16.6-cp27-cp27m-macosx_10_9_x86_64.whl (13.9MB)
|################################| 13.9MB 1.7MB/s
Collecting pytz>=2011k
Downloading https://files.pythonhosted.org/packages/e7/f9/f0b53f88060247251bf481fa6ea62cd0d25bf1b11a87888e53ce5b7c8ad2/pytz-2019.3-py2.py3-none-any.whl (509kB)
|################################| 512kB 1.4MB/s
Collecting six>=1.5
Downloading https://files.pythonhosted.org/packages/65/eb/1f97cb97bfc2390a276969c6fae16075da282f5058082d4cb10c6c5c1dba/six-1.14.0-py2.py3-none-any.whl
Installing collected packages: six, python-dateutil, numpy, pytz, pandas
但是,在尝试使用它时(python 2.7.17)我确实得到了一个错误
>>> import pandas as pd
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named pandas
>>>
有任何想法吗 ?
TIA
解决方案
推荐阅读
- javascript - 谷歌地图未加载到自动 div
- sql-server - SQL数据库中一张表导入多张Excel表,只有一张表有表头
- docker - 如何对接第三方 Go 应用程序
- c++ - 为什么会有一个指向未指定模板类的对象的指针(没有指定使用的实际类型)?
- javascript - chrome 扩展仅在后台页面处于活动状态时运行
- bash - Crontab - 在日志条目之间添加换行符
- python - Python 3 将 json 值读取为元组
- ios - UIActivityViewController 错误:无法确定 URL 是否由文件提供程序管理
- sql - Oracle SQL - 将表行数据透视表并在数据透视表中使用子查询
- python - 如何使用 Pandas cut() 对记录进行分组?