Python pip install pyarrow error, unable to execute 'cmake'
Solution 1
For me (on linux) the problem was a too old version of pip
pip --version
> pip 18.1
which is according to arrow.apache.org too low:
On Linux, you will need pip >= 19.0 to detect the prebuilt binary packages.
to upgrade pip
to the latest version, this worked for me:
pip install --upgrade pip
but it might be different for you, see this thread for other ways to upgrade pip
.
Solution 2
Finally I found a way to get around this situation by installing an earlier version of pyarrow. I was trying to install pyarrow-0.10.0 which failed. But if I'm installing the pyarrow-0.9.0, it works. So I think there might be some compatible issues between cmake and pyarrow-0.10.0.
Yiming Wu
Updated on February 11, 2022Comments
-
Yiming Wu about 2 years
I'm trying to install the pyarrow on a master instance of my EMR cluster, however I'm always receiving this error.
[hadoop@ip-XXX-XXX-XXX-XXX ~]$ sudo /usr/bin/pip-3.4 install pyarrow Collecting pyarrow Downloading https://files.pythonhosted.org/packages/c0/a0/f7e9dfd8988d94f4952f9b50eb04e14a80fbe39218520725aab53daab57c/pyarrow-0.10.0.tar.gz (2.1MB) 100% |████████████████████████████████| 2.2MB 643kB/s Requirement already satisfied: numpy>=1.10 in /usr/local/lib64/python3.4/site-packages (from pyarrow) Requirement already satisfied: six>=1.0.0 in /usr/local/lib/python3.4/site-packages (from pyarrow) Installing collected packages: pyarrow Running setup.py install for pyarrow ... error Complete output from command /usr/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/mnt/tmp/pip-build-pr3y5_mu/pyarrow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-vmywdpeg-record/install-record.txt --single-version-externally-managed --compile: /usr/lib64/python3.4/distutils/dist.py:260: UserWarning: Unknown distribution option: 'long_description_content_type' warnings.warn(msg) /mnt/tmp/pip-build-pr3y5_mu/pyarrow/.eggs/setuptools_scm-3.1.0-py3.4.egg/setuptools_scm/utils.py:118: UserWarning: 'git' was not found running install running build running build_py creating build creating build/lib.linux-x86_64-3.4 creating build/lib.linux-x86_64-3.4/pyarrow copying pyarrow/pandas_compat.py -> build/lib.linux-x86_64-3.4/pyarrow copying pyarrow/serialization.py -> build/lib.linux-x86_64-3.4/pyarrow ...... creating build/lib.linux-x86_64-3.4/pyarrow/tests/data copying pyarrow/tests/data/v0.7.1.all-named-index.parquet -> build/lib.linux-x86_64-3.4/pyarrow/tests/data copying pyarrow/tests/data/v0.7.1.column-metadata-handling.parquet -> build/lib.linux-x86_64-3.4/pyarrow/tests/data copying pyarrow/tests/data/v0.7.1.parquet -> build/lib.linux-x86_64-3.4/pyarrow/tests/data copying pyarrow/tests/data/v0.7.1.some-named-index.parquet -> build/lib.linux-x86_64-3.4/pyarrow/tests/data running build_ext creating build/temp.linux-x86_64-3.4 -- Runnning cmake for pyarrow cmake -DPYTHON_EXECUTABLE=/usr/bin/python3.4 -DPYARROW_BOOST_USE_SHARED=on -DCMAKE_BUILD_TYPE=release /mnt/tmp/pip-build-pr3y5_mu/pyarrow unable to execute 'cmake': No such file or directory error: command 'cmake' failed with exit status 1 ---------------------------------------- Command "/usr/bin/python3.4 -u -c "import setuptools, tokenize;__file__='/mnt/tmp/pip-build-pr3y5_mu/pyarrow/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" install --record /tmp/pip-vmywdpeg-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /mnt/tmp/pip-build-pr3y5_mu/pyarrow/
I don't know why it says 'command 'cmake' failed with exit status 1', In fact to be sure, I preinstalled the cmake, but I still get this error. Furthermore, I can do sudo pip install pyarrow with no problem, but I'm getting error when using sudo pip-3.4 install pyarrow. Am I missing something or maybe this error has nothing to do with cmake? I'll appreciate for any help.
-
Sherlock over 5 yearshow did you install pyarrow-0.9.0 version?
-
Yiming Wu over 5 years@Sherlock You can use pip install pyarrow==0.9.0 or whatever other versions you want to.
-
dter over 5 yearsthis was the solution for me too!
-
Revolucion for Monica almost 3 yearsDidn't work for me. I still have the error
pyarrow" failed with error code 1