简体   繁体   English

为Python 2.6安装熊猫

[英]Install pandas for Python 2.6

Currently I have two versions of python (2.6 and 2.7) on my unix machine. 目前,我的Unix机器上有两个版本的python(2.6和2.7)。

Python 2.7 has already got pandas installed for it but 2.6 doesn't have. Python 2.7已经为此安装了熊猫,但2.6没有。 So, I'm trying to install pandas specifically for python2.6 as my production environment has got ONLY python 2.6 and I cannot upgrade that at this point of time. 因此,我正在尝试专门为python2.6安装熊猫,因为我的生产环境只有python 2.6,目前无法升级。 When I tried installing it using the below command, it says "Requirement already satisfied" pointing to python2.7 and nothing got added to python 2.6. 当我尝试使用以下命令安装它时,它说“已经满足要求”,指向python2.7,而python 2.6没有添加任何内容。

@user  pip install pandas
Requirement already satisfied: pandas in /usr/local/lib/python2.7/site-
packages
Requirement already satisfied: pytz>=2011k in 
            /usr/local/lib/python2.7/site-packages (from pandas)
Requirement already satisfied: numpy>=1.7.0 in 
            /usr/local/lib/python2.7/site-packages (from pandas)
Requirement already satisfied: python-dateutil in 
            /usr/local/lib/python2.7/site-packages (from pandas)
Requirement already satisfied: six>=1.5 in 
            /usr/local/lib/python2.7/site-packages (from python-dateutil-
            >pandas)

Please advice on how do I specifically install Pandas for Python2.6. 请提供有关我如何专门为Python2.6安装Pandas的建议。

Assuming you installed Python 2.6 in the usual directory, you can just run 假设您在常规目录中安装了Python 2.6,则只需运行

C:\Python26\Scripts\pip.exe

or go to that directory in a Command Prompt and run 或在命令提示符下转到该目录并运行

.\pip.exe 

Oops. 哎呀。 Just noticed you're on a UNIX box. 只是注意到您正在使用UNIX系统。 But the result is the same. 但是结果是一样的。 You must specify the full path to the pip you want, or go to the directory and run .\\pip 您必须指定所需pip的完整路径,或转到目录并运行.\\pip

The other pip and python are in the system "path", the list of places that get searched for an executable. 另一个pip和python在系统“路径”中,即搜索可执行文件的位置列表。 So, you have to tell the O/S exactly which pip you want to run. 因此,您必须准确告诉pip要运行哪个pip Otherwise, if you just say pip , it will find whichever one it can find in the system path. 否则,如果您只是说pip ,它将在系统路径中找到可以找到的任何一个。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM