Sinaptik-AI / pandas-ai

Chat with your database (SQL, CSV, pandas, polars, mongodb, noSQL, etc). PandasAI makes data analysis conversational using LLMs (GPT 3.5 / 4, Anthropic, VertexAI) and RAG.
https://pandas-ai.com
Other
12.83k stars 1.24k forks source link

Install pandasai with python 3.12, pandas 1.5.3 -> 2.1.1 #1386

Open SebG-js opened 2 days ago

SebG-js commented 2 days ago

System Info

Impossible to install pandasai with python 3.12: Python 3.12 OS : ubuntu Pandasai version:

🐛 Describe the bug

Please could you upgrade the pandas requirement from 1.5.3 to a newer version like 2.2 :

Error log:

   UPDATING build/lib.linux-x86_64-cpython-312/pandas/_version.py
      set build/lib.linux-x86_64-cpython-312/pandas/_version.py to '1.5.3'
      running build_ext
      building 'pandas._libs.algos' extension
      creating build/temp.linux-x86_64-cpython-312/pandas/_libs
      x86_64-linux-gnu-gcc -fno-strict-overflow -Wsign-compare -DNDEBUG -g -O2 -Wall -fPIC -DNPY_NO_DEPRECATED_API=0 -Ipandas/_libs/src/klib -I/tmp/pip-build-env-x1lo57ag/overlay/lib/python3.12/site-packages/numpy/core/include -I/tmp/pip-build-env-x1lo57ag/overlay/lib/python3.12/site-packages/numpy/core/include -I/tmp/pip-build-env-x1lo57ag/overlay/lib/python3.12/site-packages/numpy/core/include -I/tmp/pip-build-env-x1lo57ag/overlay/lib/python3.12/site-packages/numpy/core/include -I/tmp/pip-build-env-x1lo57ag/overlay/lib/python3.12/site-packages/numpy/core/include -I/tmp/pip-build-env-x1lo57ag/overlay/lib/python3.12/site-packages/numpy/core/include -I/tmp/pip-build-env-x1lo57ag/overlay/lib/python3.12/site-packages/numpy/core/include -I/home/ubuntu/git/JustRAG/venv/include -I/usr/include/python3.12 -c pandas/_libs/algos.c -o build/temp.linux-x86_64-cpython-312/pandas/_libs/algos.o
      error: command 'x86_64-linux-gnu-gcc' failed: No such file or directory
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
  ERROR: Failed building wheel for pandas
ERROR: ERROR: Failed to build installable wheels for some pyproject.toml based projects (pandas)
dosubot[bot] commented 2 days ago

Hey there, @SebG-js! I'm here to help you with bug fixes, answer questions, and assist in becoming a contributor. Let's tackle this issue together!

To resolve the installation issue of pandasai with Python 3.12, you need to update the pandas requirement in the pyproject.toml file from version 1.5.3 to at least 2.1.1. This change is necessary because pandas version 1.5.3 is not fully compatible with Python 3.12. Here's how you can modify the pyproject.toml file:

[tool.poetry.dependencies]
pandas = ">=2.1.1"  # Updated version

This update should help resolve the installation issues by ensuring compatibility with Python 3.12 [1].

To continue talking to Dosu, mention @dosu.

SebG-js commented 2 days ago

Not so trivial : at least two packages to upgrade: modin .018.1 -> 0.32.0 ibm-watsonx-ai ^0.2.3 -> 1.1.11

but the last version of ibm-watsonx-ai is not compliant w py3.12 https://pypi.org/project/ibm-watsonx-ai/ The official python version is 3.10 :-(

SebG-js commented 2 days ago

Related to this ticket https://github.com/Sinaptik-AI/pandas-ai/pull/1121.