VRSEN / agency-swarm

The only reliable agent framework built on top of the latest OpenAI Assistants API.
https://vrsen.github.io/agency-swarm/
MIT License
2.42k stars 650 forks source link

Installation fails on Windows, possibly due to UTF-8 encoding issues #58

Closed clone45 closed 8 months ago

clone45 commented 8 months ago

Hello! Thanks for creating this!

Following your installations instruction verbatim from your video (https://www.youtube.com/watch?v=qXxO7SvbGs8) on Windows 11 resulted in the following error when running:

pip install .

The error was:

C:\Code\agency-swarm>pip install .
Processing c:\code\agency-swarm
  Installing build dependencies ... done
  Getting requirements to build wheel ... error
  error: subprocess-exited-with-error

  × Getting requirements to build wheel did not run successfully.
  │ exit code: 1
  ╰─> [21 lines of output]
      Traceback (most recent call last):
        File "C:\Users\Bret\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
          main()
        File "C:\Users\Bret\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 335, in main
          json_out['return_val'] = hook(**hook_input['kwargs'])
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Bret\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 118, in get_requires_for_build_wheel
          return hook(config_settings)
                 ^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Bret\AppData\Local\Temp\pip-build-env-b81tpqjt\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel
          return self._get_build_requires(config_settings, requirements=['wheel'])
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        File "C:\Users\Bret\AppData\Local\Temp\pip-build-env-b81tpqjt\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
          self.run_setup()
        File "C:\Users\Bret\AppData\Local\Temp\pip-build-env-b81tpqjt\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
          exec(code, locals())
        File "<string>", line 13, in <module>
        File "C:\Users\Bret\AppData\Local\Programs\Python\Python312\Lib\encodings\cp1252.py", line 23, in decode
          return codecs.charmap_decode(input,self.errors,decoding_table)[0]
                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
      UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 4: character maps to <undefined>
      [end of output]

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

× Getting requirements to build wheel did not run successfully.
│ exit code: 1
╰─> See above for output.

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

I found a work-around, which is to run the following before that instruction:

set PYTHONUTF8=1

I don't know if this is something that can be fixed, but if so, that might save other Windows users some pain. :-)

TylerAlmeida commented 8 months ago

Even setting pythonutf8=1 didn't work for me either. Figured it out, looks like the setup.py just needs to force the encoding for the readme: long_description=open('README.md', encoding='utf-8').read(),