python parquet 安装在带有 snappy 和 thiftpy 的 macos 上失败 [英] python parquet install fails on macos with snappy and thiftpy

查看:135
本文介绍了python parquet 安装在带有 snappy 和 thiftpy 的 macos 上失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对 python 比较陌生.我需要一种具有适度磁盘要求的快速 IO 格式.羽毛缺乏压缩,所以它是实木复合地板.我尝试安装

I am relatively new to python. I need a fast IO format with modest disk requirements. feather lacks compression, so parquet it is. I tried to install

sudo pip3 install parquet

在 macos 10.14.6、Python 3.7.4、pip 19.1.1 上.

on macos 10.14.6, Python 3.7.4, pip 19.1.1.

第一组错误与 snappy 相关.它们可以通过 brew install snappysudo pip3 install snappy 修复.(问:pip3 不能自动找出并满足依赖关系,或者至少指示如何解决这个问题?)

the first set of errors relate to snappy. they can be fixed with brew install snappy and sudo pip3 install snappy. (Q: could pip3 not automatically figure out and satisfy the dependency, or at least instruct how to fix this?)

但是,我倒霉了:

...
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/include -I/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/Tk.framework/Versions/8.5/Headers -I/usr/local/include -I/usr/local/opt/openssl/include -I/usr/local/opt/sqlite/include -I/usr/local/Cellar/python/3.7.4/Frameworks/Python.framework/Versions/3.7/include/python3.7m -c thriftpy/transport/cybase.c -o build/temp.macosx-10.14-x86_64-3.7/thriftpy/transport/cybase.o
thriftpy/transport/cybase.c:3127:24: error: no member named 'exc_type' in 'struct _ts'
    tmp_type = tstate->exc_type;
               ~~~~~~  ^
thriftpy/transport/cybase.c:3128:25: error: no member named 'exc_value' in 'struct _ts'; did you mean 'curexc_value'?
    tmp_value = tstate->exc_value;
                        ^~~~~~~~~
                        curexc_value
...

还有瓦迪斯吗?

推荐答案

parquet 包已经过时且无人维护.要在 Python 中读写 Parquet 文件,您应该安装 pyarrow 并使用 pyarrow.parquet 模块.

The parquet package is unmaintained and outdated. To read and write Parquet files in Python, you should install pyarrow and use the pyarrow.parquet module.

当您安装了 pyarrowpandas 后,您还可以通过 pandas.read_parquet 使用 pandas 的 Parquet 功能> 和 pandas.DataFrame.to_parquet 为方便起见.

When you have pyarrow and pandas installed you can also use pandas's Parquet functionality with pandas.read_parquet and pandas.DataFrame.to_parquet for convenience.

这篇关于python parquet 安装在带有 snappy 和 thiftpy 的 macos 上失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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