I’ve set up a conda environment and tried installing pandasai, but I’m encountering errors that I don’t understand. Can anyone help me with this? Below is a screenshot of the error:
At first the error was indicating that i need to install visual studio build tools C++ version 14 or higher. So installed it. then tried uninstalling pandas and reinstalled it. But doesn’t worked either
Suggest you check which versions of python the package supports then install that version of python. You can see the supported version on the packages PyPI page.
The error you showed is triggered by trying to build pandas 1.5.3 from source during the pandasai install. That may not work in Python 3.12 (It actually did work on my Mac, but a build from source code is always tricky because of all the required extra dependencies). I would contact the pandasai team about this. – It’s also strange/problematic that pandasai pins the required pandas version to v1.5.3 (the current pandas version is 2.2.2).
As work-around you could try using an earlier Python version (I’d suggest 3.10; 3.11 may also not work but I didn’t verify). Then if you are working in a conda environment (as you seem to be doing),
- make sure you know about best practices of using pip in a conda environment
- use conda (not pip) to first install pandas=1.5.3, and only then
- run
pip install pandasai
or build pandasai from source.
If you’re not using a conda env, then it’s of course fine to simply use pip for all the installs.
Pandasai promotes itself as a library that is specifically suited for data scientists who may not be so familiar with python, but, in fact, the install is not always so trivial. For specific followup questions, you could also consider contacting the pandasai support on their discord server.