Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lack of (pandas) Cython3 support cause installation error #63

Open
prhbrt opened this issue May 28, 2024 · 0 comments
Open

Lack of (pandas) Cython3 support cause installation error #63

prhbrt opened this issue May 28, 2024 · 0 comments

Comments

@prhbrt
Copy link

prhbrt commented May 28, 2024

Google Colab currently packs Cython 3, which doesn't compile the required pandas well:

ERROR:

[16/40] Cythonizing pandas\_libs/reduction.pyx
    
    Error compiling Cython file:
    ------------------------------------------------------------
    ...
    
            self.orig_data = self.buf.data
            self.orig_len = self.buf.shape[0]
            self.orig_stride = self.buf.strides[0]
...

see also this pandas issue

Maybe add cython<3 as a requirement. Anyway, I fixed my notebook by installing an older version, 0.29.37, of cython:

FIX:

# check current cython version without importing:
cython_major_version = !python3 -c 'import cython;print(cython.__version__[0])'
# if 3 or later, install older:
if int(cython_major_version[0]) >= 3:
  !pip3 install cython'<3'
# check if genalog is installed, if not checkout and install
try:
  import genalog
except ImportError:
  !test -e genalog || git clone https://github.com/microsoft/genalog.git
  !cd genalog; python3 setup.py install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant