Python pandas 卡在版本0.7.0 [英] Python pandas stuck at version 0.7.0

查看:74
本文介绍了Python pandas 卡在版本0.7.0的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

首先,我是新手...我是Python,熊猫和Linux的新手.

First off, I'm a novice... I'm a newbie to Python, pandas, and Linux.

尝试填充DataFrame时出现一些错误(sql.read_frame()尝试从MySQL数据库读取时出现异常,但我能够执行和获取查询/存储的proc).我注意到熊猫的版本是0.7.0,运行"sudo apt-get install python-pandas"只是说它是最新的(没有错误):"... python-pandas已经是最新版本.0升级..."

I'm getting some errors when trying to populate a DataFrame (sql.read_frame() gives an exception when trying to read from my MySQL DB, but I am able to execute and fetch a query / stored proc). I noticed that pandas is at version 0.7.0, and running "sudo apt-get install python-pandas" just says that it's up to date (no errors): "... python-pandas is already the newest version. 0 upgraded..."

根据我在网上发现的其他一些帖子,我认为我的DataFrame问题可能是由于熊猫的版本较旧(关于涉及到元组元组的熊猫错误?).为什么熊猫不会更新到最新版本?

Based on some other posts I found on the web, I think my DataFrame problem may be due to the older version of pandas (something about a pandas bug involving tuples of tuples?). Why won't pandas update to a more current version?

设置:

Ubuntu: 12.04.2 LTS Desktop (virtual workstation on VMWare)
sudo apt-get update, sudo apt-get upgrade, and sudo apt-get dist-upgrade all current
Python: 2.7.3 (default, April 10 2013, 06:20:15) /n [GCC 4.6.3] on Linux2
$ "which python" only show a single instance: /usr/bin/python
pandas.__version__ = 0.7.0
numpy.__version__ = 1.6.1

我以前尝试安装Anaconda,但是由于版本冲突的Python,这变成了一个噩梦.最后,我回滚到以前的VM快照并重新开始,在各个软件包上使用apt-get安装了所有MySQL,pandas和iPython.

I tried installing Anaconda previously, but that turned into a big nightmare, with conflicting versions of Python. I finally rolled back to previous VM snapshot and started over, installing all of the MySQL, pandas, and iPython using apt-get on the individual packages.

我在此工作站上没有任何其他问题... apt-get似乎总体上运行良好,并且所有其他应用程序(MySQL Workbench,水壶/汤匙等)都可以正常工作,并且可以运行到日期.

I'm not having any other problems on this workstation... apt-get seems to be working fine in general, and all other apps (MySQL Workbench, Kettle / spoon, etc.) are all working properly and up to date.

有什么想法为什么Python熊猫不会升级到0.11.0?谢谢.

Any ideas why Python pandas won't upgrade to 0.11.0? Thank you.

推荐答案

如nitin所指出的,您可以简单地使用pip升级熊猫:

As nitin points out, you can simply upgrade pandas using pip:

pip install --upgrade pandas

由于此版本的pandas将安装在site-packages中,因此您实际上将受到该目录中软件包自动更新的支配.明智的做法是将所需的软件包版本安装到虚拟环境,因此您拥有一致的工作环境,并具有可重复性.

Since this version of pandas will be installed in site-packages you will, in fact, be at the mercy of any automatic updates to packages within that directory. It's wise to install the versions of packages you want into a virtual environment so you have a consistent working environment with the bonus of reproducibility.

要回答您的最后一个问题,Pandas不会使用apt-get update升级"到0.11.0的原因是来自您发行版的(Pandas)软件包滞后或尚未创建.

To answer your last question, the reason Pandas won't "upgrade" to 0.11.0 using apt-get update is that packages (of Pandas) from your distribution lag behind or haven't been created yet.

这篇关于Python pandas 卡在版本0.7.0的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆