kyegomez / swarms

The Enterprise-Grade Production-Ready Multi-Agent Orchestration Framework Join our Community: https://discord.com/servers/agora-999382051935506503
https://docs.swarms.world
Other
1.09k stars 157 forks source link

[BUG][Help] Help to run the project #417

Open luansemensato opened 5 months ago

luansemensato commented 5 months ago

Describe the bug I'm reaching out to seek assistance regarding an issue I encountered while attempting to run a Python script.

I just cloned the project and ran the installation scripts.

I executed the script "example.py" using the command "$ python example.py," but it seems to have failed. Unfortunately, I don't have much experience with Python, and I'm unsure how to proceed in troubleshooting this issue.

Could you please provide guidance on how to identify and resolve the problem? I'll provide the complete error message at the end of this request for your reference.

Thank you for assistance.

To Reproduce Steps to reproduce the behavior:

  1. pip3 install -U swarms
  2. pip install -r requirements.txt
  3. Add OPENAI_API_KEY
  4. python example.py

Expected behavior

Screenshots image

Additional context

Upvote & Fund

Fund with Polar

github-actions[bot] commented 5 months ago

Hello there, thank you for opening an Issue ! πŸ™πŸ» The team was notified and they will get back to you asap.

kyegomez commented 5 months ago

@luansemensato what's your openai verison?

luansemensato commented 5 months ago

@kyegomez The same version as the "requirements.txt" file: 0.28.0

Screenshot 2024-03-12 at 15 53 57

kyegomez commented 5 months ago

@luansemensato upgrade your python, your python doesn't have the |command!

luansemensato commented 5 months ago

@kyegomez Which version is indicated? Could you elaborate on that?

kyegomez commented 5 months ago

@luansemensato what is your python

ricardoschiller commented 5 months ago

With python 3.12 the

pip3 install -U swarms

doesn't work.

image

Edit: python 3.11 works.

kyegomez commented 5 months ago

@ricardoschiller can you post the full error, I need the full error not an image

ricardoschiller commented 5 months ago

@ricardoschiller can you post the full error, I need the full error not an image

Here:

(tree-of-thoughts) C:\Team\personal\tree-of-thoughts>pip3 install -U swarms Collecting swarms Using cached swarms-4.2.9-py3-none-any.whl.metadata (41 kB) Collecting Pillow==9.4.0 (from swarms) Using cached Pillow-9.4.0.tar.gz (50.4 MB) Preparing metadata (setup.py) ... done Collecting accelerate (from swarms) Using cached accelerate-0.28.0-py3-none-any.whl.metadata (18 kB) Collecting anthropic (from swarms) Using cached anthropic-0.19.2-py3-none-any.whl.metadata (15 kB) Collecting asyncio==3.4.3 (from swarms) Using cached asyncio-3.4.3-py3-none-any.whl.metadata (1.7 kB) Collecting backoff==2.2.1 (from swarms) Using cached backoff-2.2.1-py3-none-any.whl.metadata (14 kB) Collecting bitsandbytes (from swarms) Using cached bitsandbytes-0.43.0-py3-none-win_amd64.whl.metadata (1.9 kB) Collecting chromadb (from swarms) Using cached chromadb-0.4.24-py3-none-any.whl.metadata (7.3 kB) Collecting datasets (from swarms) Using cached datasets-2.18.0-py3-none-any.whl.metadata (20 kB) Collecting diffusers (from swarms) Using cached diffusers-0.26.3-py3-none-any.whl.metadata (19 kB) Collecting einops==0.7.0 (from swarms) Using cached einops-0.7.0-py3-none-any.whl.metadata (13 kB) Collecting faiss-cpu==1.7.4 (from swarms) Using cached faiss-cpu-1.7.4.tar.gz (57 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Collecting google-generativeai==0.3.1 (from swarms) Using cached google_generativeai-0.3.1-py3-none-any.whl.metadata (5.9 kB) Collecting httpx==0.24.1 (from swarms) Using cached httpx-0.24.1-py3-none-any.whl.metadata (7.4 kB) Collecting huggingface-hub (from swarms) Using cached huggingface_hub-0.21.4-py3-none-any.whl.metadata (13 kB) Collecting langchain==0.0.333 (from swarms) Using cached langchain-0.0.333-py3-none-any.whl.metadata (16 kB) Collecting langchain-experimental==0.0.10 (from swarms) Using cached langchain_experimental-0.0.10-py3-none-any.whl.metadata (718 bytes) Collecting loguru==0.7.2 (from swarms) Using cached loguru-0.7.2-py3-none-any.whl.metadata (23 kB) Collecting openai==0.28.0 (from swarms) Using cached openai-0.28.0-py3-none-any.whl.metadata (13 kB) Collecting opencv-python-headless==4.8.1.78 (from swarms) Using cached opencv_python_headless-4.8.1.78-cp37-abi3-win_amd64.whl.metadata (20 kB) Collecting optimum==1.15.0 (from swarms) Using cached optimum-1.15.0-py3-none-any.whl.metadata (17 kB) Collecting peft (from swarms) Using cached peft-0.9.0-py3-none-any.whl.metadata (13 kB) Collecting pgvector (from swarms) Using cached pgvector-0.2.5-py2.py3-none-any.whl.metadata (9.9 kB) Collecting pinecone-client (from swarms) Using cached pinecone_client-3.1.0-py3-none-any.whl.metadata (14 kB) Collecting psutil (from swarms) Using cached psutil-5.9.8-cp37-abi3-win_amd64.whl.metadata (22 kB) Collecting pydantic==1.10.12 (from swarms) Using cached pydantic-1.10.12-py3-none-any.whl.metadata (149 kB) Collecting pypdf==4.0.1 (from swarms) Using cached pypdf-4.0.1-py3-none-any.whl.metadata (7.4 kB) Collecting ratelimit==2.2.1 (from swarms) Using cached ratelimit-2.2.1.tar.gz (5.3 kB) Preparing metadata (setup.py) ... done Collecting rich==13.5.2 (from swarms) Using cached rich-13.5.2-py3-none-any.whl.metadata (18 kB) Collecting roboflow (from swarms) Using cached roboflow-1.1.23-py3-none-any.whl.metadata (9.3 kB) Collecting scikit-image (from swarms) Using cached scikit_image-0.22.0-cp312-cp312-win_amd64.whl.metadata (13 kB) Collecting sentence-transformers (from swarms) Using cached sentence_transformers-2.5.1-py3-none-any.whl.metadata (11 kB) Collecting sentencepiece==0.1.98 (from swarms) Using cached sentencepiece-0.1.98.tar.gz (2.6 MB) Preparing metadata (setup.py) ... error error: subprocess-exited-with-error

Γ— python setup.py egg_info did not run successfully. β”‚ exit code: 1 ╰─> [17 lines of output] Traceback (most recent call last): File "", line 2, in File "", line 34, in File "C:\Users\user1\AppData\Local\Temp\pip-install-_2g6t6ea\sentencepiece_108b4d0b704d4d27a04849436f34b052\setup.py", line 126, in subprocess.check_call([ File "C:\Users\user1\AppData\Local\miniconda3\envs\tree-of-thoughts\Lib\subprocess.py", line 408, in check_call retcode = call(*popenargs, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user1\AppData\Local\miniconda3\envs\tree-of-thoughts\Lib\subprocess.py", line 389, in call with Popen(popenargs, **kwargs) as p: ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\user1\AppData\Local\miniconda3\envs\tree-of-thoughts\Lib\subprocess.py", line 1026, in init self._execute_child(args, executable, preexec_fn, close_fds, File "C:\Users\user1\AppData\Local\miniconda3\envs\tree-of-thoughts\Lib\subprocess.py", line 1538, in _execute_child hp, ht, pid, tid = _winapi.CreateProcess(executable, args, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [WinError 2] The system cannot find the file specified [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: metadata-generation-failed

Γ— Encountered error while generating package metadata. ╰─> See above for output.

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

luansemensato commented 5 months ago

With python 3.12 the

pip3 install -U swarms

doesn't work.

image

Edit: python 3.11 works.

@ricardoschiller How did you make the switch to python 3.11? Could you describe me?

ricardoschiller commented 5 months ago

@luansemensato I just installed a new conda environment with python 3.11 and tested it there.

kyegomez commented 5 months ago

@ricardoschiller @luansemensato

try this:

pip3 install -U swarms==4.3.0

luansemensato commented 5 months ago

@ricardoschiller @luansemensato

try this:

pip3 install -U swarms==4.3.0

The error persists.

kyegomez commented 5 months ago

@luansemensato Please try upgrading:

pip3 install -U swarms

everettVT commented 2 weeks ago

@luansemensato and @ricardoschiller.

Swarms runs on Python 3.10, which should explain some of the install/build issues. If you can create a new virtual environment with 3.10 and check back in we can try to handle any other build errors in a new issue.

Please let us know if you are ready to close the issue.