ag2ai/ag2

[Issue]: Can't successfully install CaptainAgent

Opened this issue · 5 comments

Describe the issue

Installation according to the documentation is to run:
pip install ag2[autobuild]
it should be
pip install ag2[captainagent]

However, members of the community (patelnik7, vonullid) on Discord have noted:

  • It isn't installing the necessary pandas package
  • Isn't including the CaptainAgent tools library
  • Is failing to install pysqlite3

If you are having issues getting CaptainAgent up and running, please let us know here.

Steps to reproduce

No response

Screenshots and logs

No response

Additional Information

No response

I've added a PR, #76, that addresses the pandas and tools library issues.

DEPRECATION: pysqlite3 is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at pypa/pip#8559
Running setup.py install for pysqlite3 ... error
error: subprocess-exited-with-error

× Running setup.py install for pysqlite3 did not run successfully.
│ exit code: 1
╰─> [14 lines of output]
running install
C:\Users\wjbea\AppData\Local\Programs\Python\Python311\Lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(
running build
running build_py
creating build
creating build\lib.win-amd64-cpython-311
creating build\lib.win-amd64-cpython-311\pysqlite3
copying pysqlite3\dbapi2.py -> build\lib.win-amd64-cpython-311\pysqlite3
copying pysqlite3_init_.py -> build\lib.win-amd64-cpython-311\pysqlite3
running build_ext
Builds a C extension linking against libsqlite3 library
building 'pysqlite3._sqlite3' extension
error: Microsoft Visual C++ 14.0 or greater is required. Get it with "Microsoft C++ Build Tools": https://visualstudio.microsoft.com/visual-cpp-build-tools/
[end of output]

note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure

× Encountered error while trying to install package.
╰─> pysqlite3

note: This is an issue with the package mentioned above, not pip.
hint: See above for output from the failure.

[notice] A new release of pip available: 22.3 -> 24.3.1
[notice] To update, run: python.exe -m pip install --upgrade pip

Thanks @learnbydoingwithsteven! Let me have a look into that...

@learnbydoingwithsteven I had the same problem. Install the sqlite3 and set environments will resolve the problem.
Mac
brew install sqlite3

and add this into your .zshrc.

export LDFLAGS="-L/opt/homebrew/opt/sqlite/lib"
export CPPFLAGS="-I/opt/homebrew/opt/sqlite/include"

Thanks for your note and advice on the issue, @bean-du.

I have checked if installing pysqlite3-binary works, and it looks to do so. This avoids the compilation issue with trying to pip install pysqlite3.

I have updated the setup in PR #76, hopefully that helps those in the future.

@learnbydoingwithsteven, if you are still having issues, hopefully #76 will get merged soon. In the meantime, there are instructions in the comments in there on how you could install it.

#76 addresses all the issues noted at the top - so we'll keep the issue open for a short while in case other issues arise, and then we can close it.