【发布时间】:2021-03-14 21:41:29
【问题描述】:
我对包管理相对较新,在我的 Windows x64 机器上安装 pyarrow 时遇到了障碍。 Pyarrow 文档说要使用其中一个
conda install -c conda-forge pyarrow
或
pip install pyarrow
https://arrow.apache.org/docs/python/install.html
conda 命令给出
PackagesNotFoundError: The following packages are not available from current channels:
pip 命令在标题下给出了一个非常冗长的错误转储
Installing build dependencies ... error
ERROR: Command errored out with exit status 1:
- 我在 Python 3.7.9 和 Python 3.8.5 conda 环境中都试过了 因为至少有关于这个问题的 Github Jira 讨论 历史上 (https://issues.apache.org/jira/browse/ARROW-7076)
- 在 conda 方法中,我 [成功地] 将 https://conda.anaconda.org/conda-forge/win-64 添加到当前频道,但对于
pyarrow仍然“找不到包”。我这样做是因为我的频道列表似乎是 32 位特定的,而我的机器是 64 位的 -
Conda-forge/win-64中有充分的证据表明 pyarrow (2.0.0) 存在
感谢您帮助成功安装此软件包。
这是我在 Conda“找不到包”消息中的当前频道列表(手动添加了“win-64”频道)
Current channels:
- https://conda.anaconda.org/conda-forge/win-32
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/win-32
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/r/win-32
- https://repo.anaconda.com/pkgs/r/noarch
- https://repo.anaconda.com/pkgs/msys2/win-32
- https://repo.anaconda.com/pkgs/msys2/noarch
- https://conda.anaconda.org/conda-forge/win-64
【问题讨论】:
-
看起来你已经安装了 32 位 anaconda,即使你强制它使用 64 位通道,它也不会从它安装包。您将需要安装 64 位 anaconda(或 miniconda)。对于 pip 方法,请将完整错误添加到您的问题中
-
感谢 FlyingTeller。这就说得通了。我发布了错误的初始部分(但整个事情大大超出了 StackOverflow 限制)
-
现在问题已解决,添加一个更正的评论...为像我这样可能不了解 32/64 位 Python 主题的其他人跟进 FlyingTeller 评论。我的 Windows Python 实际上是安装了 Anaconda 而我们安装的是 32 位版本(我的“硬件”是 64 位 Parallels VM)。以下两行代码返回“32”或“64”作为检查。
import structstruct.calcsize("P") * 8
标签: python anaconda conda pyarrow