无法在3.6.6中安装Python熊猫

问题描述 投票:0回答:1

我是Mac用户,正在尝试在Python 3.6.6中安装Pandas。在IDLE / VS Code中使用以完成我的工作。

Hasans-MacBook-Pro:~ hasan-macbookpro$ python3 --version
Python 3.6.6
Hasans-MacBook-Pro:~ hasan-macbookpro$

但是当我运行pip install pandas时,它将在Python 2.7中下载,如下所示。当我进入IDLE时,因为Pandas不在3.6.6中。它给我错误。

任何人都可以指导如何进行吗?

Hasans-MacBook-Pro:~ hasan-macbookpro$ pip install 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
Requirement already satisfied: pandas in ./Library/Python/2.7/lib/python/site-packages (0.24.2)
Requirement already satisfied: python-dateutil>=2.5.0 in ./Library/Python/2.7/lib/python/site-packages (from pandas) (2.8.1)
Requirement already satisfied: pytz>=2011k in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from pandas) (2013.7)
Requirement already satisfied: numpy>=1.12.0 in ./Library/Python/2.7/lib/python/site-packages (from pandas) (1.16.5)
Requirement already satisfied: six>=1.5 in /System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python (from python-dateutil>=2.5.0->pandas) (1.12.0)
Hasans-MacBook-Pro:~ hasan-macbookpro$
python-3.x pandas
1个回答
0
投票

尝试使用pip3 install pandas为python3指定它。

© www.soinside.com 2019 - 2024. All rights reserved.