Poetry failing to install pandas mac os

Viewed 444

folks. When I attempt to run

poetry install --no-root

I receive an error when poetry attempts to resolve the pandas dependency:

n file included from pandas/_libs/lib.c:666:
    pandas/_libs/src/parse_helper.h:141:26: error: implicit declaration of function 'tolower_ascii' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        for (; *p; ++p) *p = tolower_ascii(*p);
                             ^
    1 warning and 1 error generated.
    error: command '/usr/bin/clang' failed with exit code 1
    ----------------------------------------
ERROR: Command errored out with exit status 1: /Users/jamesnebeker/.virtualenvs/company/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/private/var/folders/2y/46hhmqpd5vs5vh1pghd_nn9r0000gp/T/pip-install-s60fjeom/pandas_2b30bf547347406991c0eac0a8670786/setup.py'"'"'; __file__='"'"'/private/var/folders/2y/46hhmqpd5vs5vh1pghd_nn9r0000gp/T/pip-install-s60fjeom/pandas_2b30bf547347406991c0eac0a8670786/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 /private/var/folders/2y/46hhmqpd5vs5vh1pghd_nn9r0000gp/T/pip-record-w_pe6_s4/install-record.txt --single-version-externally-managed --compile --install-headers /Users/jamesnebeker/.virtualenvs/company/include/site/python3.9/pandas Check the logs for full command output.

This is on macOS Big Sur. I have no idea what could be causing this issue and can't find anything about it online. Any help would be greatly appreciated.

1 Answers

I ran into the same problem yesterday, but when building an older version of pandas from source (v0.24.2). I think this error is a mismatch between a newer compiler or Python and older pandas code. From searching around it looks like this error isn't entirely new, it was previously a warning so compilation still completed.

Presuming you were trying to build an old version, either upgrade to something newer, or build manually and apply the changes in this commit (as I had to do).

https://github.com/pandas-dev/pandas/commit/1f7ef05ef4e2e5b72763d8f32d79e3495c364d35

Related