wireservice / csvkit

A suite of utilities for converting to and working with CSV, the king of tabular file formats.
https://csvkit.readthedocs.io
MIT License
6.03k stars 603 forks source link

When installing csvkit I get an error on running set.py for PyICU #1130

Closed halloleo closed 3 years ago

halloleo commented 3 years ago

I try to install the newest csvkit version from pypi and I get teh follwoing error:

Running setup.py install for PyICU ...

    ERROR: Command errored out with exit status 1:
     command: /working/software/venv/csvkit-test/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1xibz9s2/pyicu_4dc1a77721e449568aabec7764857db0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1xibz9s2/pyicu_4dc1a77721e449568aabec7764857db0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-m4w3z519/install-record.txt --single-version-externally-managed --compile --install-headers /working/software/venv/csvkit-test/include/site/python3.6/PyICU
         cwd: /tmp/pip-install-1xibz9s2/pyicu_4dc1a77721e449568aabec7764857db0/
    Complete output (1315 lines):
    (running 'icu-config --version')

    Building PyICU 2.7.3 for ICU 4.2.1 (max ICU major version supported: 69)
    .
    .
    .
    In file included from common.h:188:0,
                     from bidi.cpp:26:
    /usr/include/unicode/tmutfmt.h: At global scope:
    /usr/include/unicode/tmutfmt.h:231:29: warning: ‘UBool icu_4_2::hashTableValueComparator(UHashTok, UHashTok)’ declared ‘static’ but never defined [-Wunused-function]
         friend UBool U_CALLCONV hashTableValueComparator(UHashTok val1, UHashTok val2);
                                 ^~~~~~~~~~~~~~~~~~~~~~~~
    error: command 'gcc' failed with exit status 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /working/software/venv/csvkit-test/bin/python3 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-1xibz9s2/pyicu_4dc1a77721e449568aabec7764857db0/setup.py'"'"'; __file__='"'"'/tmp/pip-install-1xibz9s2/pyicu_4dc1a77721e449568aabec7764857db0/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-m4w3z519/install-record.txt --single-version-externally-managed --compile --install-headers /working/software/venv/csvkit-test/include/site/python3.6/PyICU Check the logs for full command output.

I'm trying to install under Python 3.6.4 on CentOS 6.

Older versions of csvkit (I think the last one was 1.0.4) installed fine.

FredericBlum commented 3 years ago

With Python 3.9.5 and Fedora34 I am currently encountering the very same issue. A difference is the Building PyICU message, which for me gives for ICU 67.1 as version.

jpmckinney commented 3 years ago

I've updated agate on GitHub to not require PyICU. You can try installing agate from GitHub:

pip install -e git+https://github.com/wireservice/agate.git#egg=agate

and then try installing csvkit. Let me know if it works, and I'll create a release of agate.

Or, try to install PyICU: https://gitlab.pyicu.org/main/pyicu#installing-pyicu

halloleo commented 3 years ago

Thanks for looking into this!

When in a new venv I issue:

pip install -e git+https://github.com/wireservice/agate.git#egg=agate

I get the error: Command "git clone -q https://github.com/wireservice/agate.git /working/software/venv/csvkit/src/agate" failed with error code 128 in None.

Any idea why?

jpmckinney commented 3 years ago

Hmm, I think this is related to your git configuration. I will make a release of agate soon (it'll be version 1.6.3), so you won't have to install from GitHub.