简体   繁体   English

无法在 macOS Big Sur 上安装 pyarrow

[英]Can't install pyarrow on macOS Big Sur

I'm trying to install streamlit which requires the pyarrow module (Python lib for Apache arrow).我试图安装streamlit这需要pyarrow模块(Python的lib中的Apache箭头)。 There's no error message, the installation just hangs indefinitely.没有错误消息,安装只是无限期挂起。

I did some research, and found out that probably pyarrow developers are not supporting Python 3.8 (not sure).我做了一些研究,发现可能pyarrow开发人员不支持 Python 3.8(不确定)。

How can I use streamlit on macOS Big Sur 11.1?如何在 macOS Big Sur 11.1 上使用streamlit

Here's what worked for me:这对我有用:

I updated python3 to 3.9 (the default version was 3.8 ).我将python3更新为 3.9 (默认版本为3.8 )。 It should do the job, if not, you should also update macOS to 11.4 (or latest).它应该可以完成这项工作,如果没有,您还应该将 macOS 更新到 11.4(或最新版本)。

If you've not update Python on a Mac before, make sure you go through this StackExchange thread or do some research before doing so.如果您之前没有在 Mac 上更新过 Python,请确保您在更新之前浏览过这个StackExchange线程或做一些研究。

I think that what you perceive as "installation just hangs" is probably the installer compiling Arrow and all its dependencies.我认为您认为“安装只是挂起”可能是安装程序编译 Arrow 及其所有依赖项。 Which takes a lot of time.这需要很多时间。

If no wheel is provided for the platform you are targeting, pip will download the source code and try to compile everything from scratch.如果没有为您的目标平台提供轮子, pip将下载源代码并尝试从头开始编译所有内容。

Notice by the way that you probably haven't reached the point where it actually tries to install arrow (it might still be installing numpy or cython) because unless you have libarrow (The C++ libraries) already installed system-wide, then installing pyarrow from source should fail with a "Could NOT find Arrow" error.请注意,您可能还没有达到实际尝试安装箭头的程度(它可能仍在安装 numpy 或 cython),因为除非您已经在系统范围内安装了 libarrow(C++ 库),然后从源应该失败并显示"Could NOT find Arrow"错误。

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

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