Pyarrow does not install with python 3.7 (anaconda 5.3.0, windows x64 version)
我通过安装Anaconda5.3.0安装了64位的Windowspython3.7版本。然后我尝试安装pyarrow("conda install pyarrow")。
Python最终把Python的等级降到了3.6级。之后事情就不那么顺利了(奇怪的错误信息)。我最终不得不卸载Python并重新安装它(因为如果程序文件夹不是空的,它不会进行修复或重新安装,所以必须卸载)。
这就剩下了python 3.7,但没有pyarrow。有没有另一个包可以为我提供与Python和熊猫拼花支持?还是有办法让pyarrow使用python3.7?
更新:根据omri374的建议,我尝试了
1 | pip install pyarrow |
这并不能解决我单独的Python回滚到python 3.6的问题(例如,当执行"conda install pyarrow"时),但它确实安装了pyarrow。请注意,它提供了以下输出——尝试更新pip时产生了对python 3.6的回滚,所以我不推荐这样做:
1 2 3 4 5 | twisted 18.7.0 requires PyHamcrest>=1.9.0, which is not installed. Installing collected packages: pyarrow Successfully installed pyarrow-0.11.0 You are using pip version 10.0.1, however version 18.1 is available. You should consider upgrading via the 'python -m pip install --upgrade pip' command. |
这是64位win anaconda 5.3.0(python 3.7)附带的PIP版本:
1 2 3 | >conda list pip #Name Version Build Channel pip 10.0.1 py37_0 |
另外,由于Pyarrow似乎需要Conda Forge频道,这是我的频道列表("Conda配置--显示频道"):渠道:
1 2 3 | - conda-forge - anaconda-fusion - defaults |
最新的pyarrow包版本解决了这个问题。我现在可以使用Python3.7安装pyarrow:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 | (base) C:\>conda install pyarrow Solving environment: done ## Package Plan ## environment location: C:\Users\xxx added / updated specs: - pyarrow The following packages will be downloaded: package | build ---------------------------|----------------- pyarrow-0.11.0 | py37h33f27b4_0 1.5 MB libboost-1.67.0 | hd9e427e_4 31.8 MB conda-4.5.11 | py37_1000 654 KB conda-forge gflags-2.2.1 | vc14_0 283 KB conda-forge lz4-c-1.8.3 | he025d50_1000 254 KB conda-forge xz-5.2.4 | h2fa13f4_1001 805 KB conda-forge thrift-cpp-0.11.0 | vc14_2 2.2 MB conda-forge arrow-cpp-0.11.0 | py37h8e05e8c_0 7.5 MB glog-0.3.5 | h6538335_1 130 KB zstd-1.3.3 | vc14_1 1.2 MB conda-forge ------------------------------------------------------------ Total: 46.2 MB The following NEW packages will be INSTALLED: arrow-cpp: 0.11.0-py37h8e05e8c_0 gflags: 2.2.1-vc14_0 conda-forge [vc14] glog: 0.3.5-h6538335_1 libboost: 1.67.0-hd9e427e_4 lz4-c: 1.8.3-he025d50_1000 conda-forge pyarrow: 0.11.0-py37h33f27b4_0 thrift-cpp: 0.11.0-vc14_2 conda-forge [vc14] xz: 5.2.4-h2fa13f4_1001 conda-forge zstd: 1.3.3-vc14_1 conda-forge [vc14] The following packages will be UPDATED: conda: 4.5.11-py37_0 --> 4.5.11-py37_1000 conda-forge |
进一步更新:我发现有一个问题影响到Conda Forge通道和新版本的python/anaconda。(或者可能有两个问题。)
目前看来,解决这个问题的办法是在频道列表中只列出"默认值",而不是CondaForge。("conda config--show channels")(但这可能只是因为"defaults"通道没有问题更新包。)
症状如下:
1
2
3
4
5 The following packages will be DOWNGRADED:
ipykernel: 4.10.0-py37_0 --> 4.9.0-py36_1
pyarrow: 0.11.1-py37h33f27b4_0 --> 0.8.0-py36_vc14_0 conda-forge [vc14]
python: 3.7.0-hea74fb7_0 --> 3.6.6-hea74fb7_0
1
2
3
4
5
6
7
8
9
10 ERROR conda.core.link:_execute(502):
An error occurred while installing package 'conda-forge::automat-0.7.0-py_1'.
CondaError: Cannot link a source that does not exist.
C:\Users\xxx\anaconda3\Scripts\conda.exe
Running conda clean --packages may resolve your problem. Attempting to roll back.
Rolling back transaction: Rolling back transaction: done
CondaError: Cannot link a source that does not exist.
C:\Users\xxx\anaconda3\Scripts\conda.exe
Running conda clean --packages may resolve your problem.