AndrewVeee / nucleo-ai

An AI assistant beyond the chat box.
Apache License 2.0
313 stars 29 forks source link

setup.sh does not fully install dependencies (MacOS/Apple Silicon) #4

Open complexinteractive opened 4 months ago

complexinteractive commented 4 months ago

After running setup.sh, I had to manually install the following packages in the nucleo venv in order to launch: flask fitz frontend tools markdownify duckduckgo_search openai sentence-transformers chromadb

I tried running pip install -r requirements.txt inside the venv using the list from the repo but that did not work. Putting all the missing packages in one pip install command did, however, work. Nucleo launches now but several features are broken. I suspect there are more things missing.

Also, argon2 refuses to compile on my system. Attempting to install it returns the following error:

(env) (base) quentin@MBP5 nucleo-ai % pip install argon2 --use-pep517 Collecting argon2 Using cached argon2-0.1.10.tar.gz (28 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: argon2 Building wheel for argon2 (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for argon2 (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [26 lines of output] Warning: 'classifiers' should be a list, got type 'tuple' running bdist_wheel running build running build_py creating build creating build/lib.macosx-11.0-arm64-cpython-310 copying argon2.py -> build/lib.macosx-11.0-arm64-cpython-310 running build_ext building '_argon2' extension creating build/temp.macosx-11.0-arm64-cpython-310 creating build/temp.macosx-11.0-arm64-cpython-310/phc-winner-argon2 creating build/temp.macosx-11.0-arm64-cpython-310/phc-winner-argon2/src creating build/temp.macosx-11.0-arm64-cpython-310/phc-winner-argon2/src/blake2 creating build/temp.macosx-11.0-arm64-cpython-310/src clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -DHAVE_CONFIG_H -DHAVE_POSIX_MEMALIGN=1 -DHAVE_SYSCTL_HW_USERMEM=1 -I./phc-winner-argon2 -I./phc-winner-argon2/src -I./phc-winner-argon2/src/blake2 -I/Users/quentin/Development/nucleo-ai/env/include -I/opt/homebrew/Caskroom/miniforge/base/include/python3.10 -c ./phc-winner-argon2/src/argon2.c -o build/temp.macosx-11.0-arm64-cpython-310/./phc-winner-argon2/src/argon2.o clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -DHAVE_CONFIG_H -DHAVE_POSIX_MEMALIGN=1 -DHAVE_SYSCTL_HW_USERMEM=1 -I./phc-winner-argon2 -I./phc-winner-argon2/src -I./phc-winner-argon2/src/blake2 -I/Users/quentin/Development/nucleo-ai/env/include -I/opt/homebrew/Caskroom/miniforge/base/include/python3.10 -c ./phc-winner-argon2/src/blake2/blake2b.c -o build/temp.macosx-11.0-arm64-cpython-310/./phc-winner-argon2/src/blake2/blake2b.o clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -DHAVE_CONFIG_H -DHAVE_POSIX_MEMALIGN=1 -DHAVE_SYSCTL_HW_USERMEM=1 -I./phc-winner-argon2 -I./phc-winner-argon2/src -I./phc-winner-argon2/src/blake2 -I/Users/quentin/Development/nucleo-ai/env/include -I/opt/homebrew/Caskroom/miniforge/base/include/python3.10 -c ./phc-winner-argon2/src/core.c -o build/temp.macosx-11.0-arm64-cpython-310/./phc-winner-argon2/src/core.o clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -DHAVE_CONFIG_H -DHAVE_POSIX_MEMALIGN=1 -DHAVE_SYSCTL_HW_USERMEM=1 -I./phc-winner-argon2 -I./phc-winner-argon2/src -I./phc-winner-argon2/src/blake2 -I/Users/quentin/Development/nucleo-ai/env/include -I/opt/homebrew/Caskroom/miniforge/base/include/python3.10 -c ./phc-winner-argon2/src/encoding.c -o build/temp.macosx-11.0-arm64-cpython-310/./phc-winner-argon2/src/encoding.o clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -DHAVE_CONFIG_H -DHAVE_POSIX_MEMALIGN=1 -DHAVE_SYSCTL_HW_USERMEM=1 -I./phc-winner-argon2 -I./phc-winner-argon2/src -I./phc-winner-argon2/src/blake2 -I/Users/quentin/Development/nucleo-ai/env/include -I/opt/homebrew/Caskroom/miniforge/base/include/python3.10 -c ./phc-winner-argon2/src/ref.c -o build/temp.macosx-11.0-arm64-cpython-310/./phc-winner-argon2/src/ref.o clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -DHAVE_CONFIG_H -DHAVE_POSIX_MEMALIGN=1 -DHAVE_SYSCTL_HW_USERMEM=1 -I./phc-winner-argon2 -I./phc-winner-argon2/src -I./phc-winner-argon2/src/blake2 -I/Users/quentin/Development/nucleo-ai/env/include -I/opt/homebrew/Caskroom/miniforge/base/include/python3.10 -c ./phc-winner-argon2/src/thread.c -o build/temp.macosx-11.0-arm64-cpython-310/./phc-winner-argon2/src/thread.o clang -Wno-unused-result -Wsign-compare -Wunreachable-code -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -fPIC -O2 -isystem /opt/homebrew/Caskroom/miniforge/base/include -arch arm64 -DHAVE_CONFIG_H -DHAVE_POSIX_MEMALIGN=1 -DHAVE_SYSCTL_HW_USERMEM=1 -I./phc-winner-argon2 -I./phc-winner-argon2/src -I./phc-winner-argon2/src/blake2 -I/Users/quentin/Development/nucleo-ai/env/include -I/opt/homebrew/Caskroom/miniforge/base/include/python3.10 -c ./src/argon2_py.c -o build/temp.macosx-11.0-arm64-cpython-310/./src/argon2_py.o clang -bundle -undefined dynamic_lookup -Wl,-rpath,/opt/homebrew/Caskroom/miniforge/base/lib -L/opt/homebrew/Caskroom/miniforge/base/lib -Wl,-rpath,/opt/homebrew/Caskroom/miniforge/base/lib -L/opt/homebrew/Caskroom/miniforge/base/lib build/temp.macosx-11.0-arm64-cpython-310/./phc-winner-argon2/src/argon2.o build/temp.macosx-11.0-arm64-cpython-310/./phc-winner-argon2/src/blake2/blake2b.o build/temp.macosx-11.0-arm64-cpython-310/./phc-winner-argon2/src/core.o build/temp.macosx-11.0-arm64-cpython-310/./phc-winner-argon2/src/encoding.o build/temp.macosx-11.0-arm64-cpython-310/./phc-winner-argon2/src/ref.o build/temp.macosx-11.0-arm64-cpython-310/./phc-winner-argon2/src/thread.o build/temp.macosx-11.0-arm64-cpython-310/./src/argon2_py.o -lc_argon2 -o build/lib.macosx-11.0-arm64-cpython-310/_argon2.cpython-310-darwin.so ld: warning: duplicate -rpath '/opt/homebrew/Caskroom/miniforge/base/lib' ignored ld: library 'c_argon2' not found clang: error: linker command failed with exit code 1 (use -v to see invocation) error: command '/usr/bin/clang' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for argon2 Failed to build argon2 ERROR: Could not build wheels for argon2, which is required to install pyproject.toml-based projects [notice] A new release of pip available: 22.3.1 -> 24.0 [notice] To update, run: pip install --upgrade pip

This appears to be something of a common problem. Other implementations like argon2-cffi install without issue. M1 Max 32GB, MacOS 13.6.3 Apologies if there are trivial solutions to these problems. I am very new to Python.

AndrewVeee commented 4 months ago

Thanks! I just pushed a change to remove argon2 since there are no passwords being set in the app.

If the setup script still fails, there is another problem on osx.

No apologies needed, I want to get this working smoothly on every os. I'm not sure if argon2 was the root cause of the issue, or if there's something else I overlooked.

Can you git pull and try again when you have a chance? You can paste the output of setup.sh if there are errors. Also, it probably won't explain how to edit data/config.toml if it already created the file, so that might cause more problems. The readme explains it, but basically just have to set the openai_base_url to your local server ip/port.

Sorry for the trouble, and thanks again for the report!

complexinteractive commented 4 months ago

No trouble at all, this is a really exciting project and I'm happy to help- especially if it means Mac users get some love, which doesn't always happen in the LLM space.

I made a fresh clone of the repo and started from scratch. The argon2 error is gone, as expected. I ran into another error but I was able to solve it myself.

On my system, at least, the venv is built with Python 3.10, which lacks the tomllib dependency used by config.py. I got around this by modifying the setup file to specify building with 3.12 and starting again. I don't know if this is actually a bug or just something I don't understand working the way it's supposed to. Regardless, for idiot-proofing purposes, you might consider exploring a way to make sure it builds with the right Python automatically. I would be happy to create a separate issue for this if necessary.

Once the venv issue was sorted, everything started working correctly. Having now used the app for about 30 minutes, there are a few quality of life features I would like to eventually see added.

Thank you for building this. I am very much looking forward to seeing what it becomes.

Runo888 commented 4 months ago

I'm having a similar issue here on Windows. I tried installing this project on Git Bash, but when it tries to install sentence_transformers (or sentence-transformers, I guess the dash/underscore doesn't matter) it throws this at me:

The result of running pip install sentence_transformers

    File "C:\Users\MyUserName\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "C:\Users\MyUserName\AppData\Local\Programs\Python\Python312\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: 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.

There's more output above, but I think this last part that I pasted here is the most relevant. I don't even know what kind of file it's looking for. I thought for a moment it might've been getting confused about the formatting in sentence_transformers somehow, so I tried again with wrapping it between quotes but it made no difference. Not sure where to go from here.

P.S. The Python 3.10 problem was also fixed by installing Python 3.12 and kicking 3.10 off of my system in AppData/Local, in case anyone else gets told it can't find tomllib.

AndrewVeee commented 4 months ago

Thanks so much to both of you for the bug reports and finding the fixes! I can't believe tomllib would be the package that causes problems haha. Actually looks difficult to use it in 3.10 and lower. I hate to do it, but I'll update the readme to specify python 3.12.

@Runo888 I think more log info might be needed. I didn't see install issues for sentence transforms on windows with a quick search. Hope we can get it fixed for you!

Runo888 commented 4 months ago

Okay, here's the whole thing. Hold on tight.

MyUsername@COMPUTERNAME MINGW64 /a/nucleo-ai (main)
$ ./setup.sh
./setup.sh: line 12: ./env/bin/activate: No such file or directory
Looking in indexes: https://pypi.org/simple, https://download.pytorch.org/whl/cpu
Requirement already satisfied: torch in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (2.2.0+cpu)
Requirement already satisfied: filelock in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from torch) (3.13.1)
Requirement already satisfied: typing-extensions>=4.8.0 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from torch) (4.9.0)
Requirement already satisfied: sympy in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from torch) (1.12)
Requirement already satisfied: networkx in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from torch) (3.2.1)
Requirement already satisfied: jinja2 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from torch) (3.1.3)
Requirement already satisfied: fsspec in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from torch) (2024.2.0)
Requirement already satisfied: MarkupSafe>=2.0 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from jinja2->torch) (2.1.5)
Requirement already satisfied: mpmath>=0.19 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from sympy->torch) (1.3.0)
Requirement already satisfied: flask in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from -r ./backend/requirements.txt (line 1)) (3.0.2)
Requirement already satisfied: openai in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from -r ./backend/requirements.txt (line 2)) (1.12.0)
Requirement already satisfied: beautifulsoup4 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from -r ./backend/requirements.txt (line 3)) (4.12.3)
Requirement already satisfied: Requests in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from -r ./backend/requirements.txt (line 4)) (2.31.0)
Collecting duckduckgo_search (from -r ./backend/requirements.txt (line 5))
  Using cached duckduckgo_search-4.4.3-py3-none-any.whl.metadata (19 kB)
Collecting sentence_transformers (from -r ./backend/requirements.txt (line 6))
  Using cached sentence_transformers-2.3.1-py3-none-any.whl.metadata (11 kB)
Requirement already satisfied: markdownify in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from -r ./backend/requirements.txt (line 7)) (0.11.6)
Collecting bs4 (from -r ./backend/requirements.txt (line 8))
  Using cached bs4-0.0.2-py2.py3-none-any.whl.metadata (411 bytes)
Collecting chromadb (from -r ./backend/requirements.txt (line 9))
  Using cached chromadb-0.4.22-py3-none-any.whl.metadata (7.3 kB)
Collecting pymupdf (from -r ./backend/requirements.txt (line 10))
  Using cached PyMuPDF-1.23.22-cp312-none-win_amd64.whl.metadata (3.4 kB)
Requirement already satisfied: Werkzeug>=3.0.0 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from flask->-r ./backend/requirements.txt (line 1)) (3.0.1)
Requirement already satisfied: Jinja2>=3.1.2 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from flask->-r ./backend/requirements.txt (line 1)) (3.1.3)
Requirement already satisfied: itsdangerous>=2.1.2 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from flask->-r ./backend/requirements.txt (line 1)) (2.1.2)
Requirement already satisfied: click>=8.1.3 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from flask->-r ./backend/requirements.txt (line 1)) (8.1.7)
Requirement already satisfied: blinker>=1.6.2 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from flask->-r ./backend/requirements.txt (line 1)) (1.7.0)
Requirement already satisfied: anyio<5,>=3.5.0 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from openai->-r ./backend/requirements.txt (line 2)) (4.2.0)
Requirement already satisfied: distro<2,>=1.7.0 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from openai->-r ./backend/requirements.txt (line 2)) (1.9.0)
Requirement already satisfied: httpx<1,>=0.23.0 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from openai->-r ./backend/requirements.txt (line 2)) (0.26.0)
Requirement already satisfied: pydantic<3,>=1.9.0 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from openai->-r ./backend/requirements.txt (line 2)) (2.6.1)
Requirement already satisfied: sniffio in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from openai->-r ./backend/requirements.txt (line 2)) (1.3.0)
Requirement already satisfied: tqdm>4 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from openai->-r ./backend/requirements.txt (line 2)) (4.66.2)
Requirement already satisfied: typing-extensions<5,>=4.7 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from openai->-r ./backend/requirements.txt (line 2)) (4.9.0)
Requirement already satisfied: soupsieve>1.2 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from beautifulsoup4->-r ./backend/requirements.txt (line 3)) (2.5)
Requirement already satisfied: charset-normalizer<4,>=2 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from Requests->-r ./backend/requirements.txt (line 4)) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from Requests->-r ./backend/requirements.txt (line 4)) (3.6)
Requirement already satisfied: urllib3<3,>=1.21.1 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from Requests->-r ./backend/requirements.txt (line 4)) (2.2.0)
Requirement already satisfied: certifi>=2017.4.17 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from Requests->-r ./backend/requirements.txt (line 4)) (2024.2.2)
Collecting curl-cffi>=0.6.0b9 (from duckduckgo_search->-r ./backend/requirements.txt (line 5))
  Using cached curl_cffi-0.6.0b9-cp38-abi3-win_amd64.whl.metadata (10 kB)
Requirement already satisfied: lxml>=5.1.0 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from duckduckgo_search->-r ./backend/requirements.txt (line 5)) (5.1.0)
Collecting nest-asyncio>=1.6.0 (from duckduckgo_search->-r ./backend/requirements.txt (line 5))
  Using cached nest_asyncio-1.6.0-py3-none-any.whl.metadata (2.8 kB)
Collecting transformers<5.0.0,>=4.32.0 (from sentence_transformers->-r ./backend/requirements.txt (line 6))
  Using cached transformers-4.37.2-py3-none-any.whl.metadata (129 kB)
Requirement already satisfied: torch>=1.11.0 in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from sentence_transformers->-r ./backend/requirements.txt (line 6)) (2.2.0+cpu)
Requirement already satisfied: numpy in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from sentence_transformers->-r ./backend/requirements.txt (line 6)) (1.26.4)
Collecting scikit-learn (from sentence_transformers->-r ./backend/requirements.txt (line 6))
  Using cached scikit_learn-1.4.0-1-cp312-cp312-win_amd64.whl.metadata (11 kB)
Requirement already satisfied: scipy in c:\users\myusername\appdata\local\programs\python\python312\lib\site-packages (from sentence_transformers->-r ./backend/requirements.txt (line 6)) (1.12.0)
Collecting nltk (from sentence_transformers->-r ./backend/requirements.txt (line 6))
  Using cached nltk-3.8.1-py3-none-any.whl (1.5 MB)
Collecting sentencepiece (from sentence_transformers->-r ./backend/requirements.txt (line 6))
  Using cached sentencepiece-0.1.99.tar.gz (2.6 MB)
  Installing build dependencies: started
  Installing build dependencies: finished with status 'done'
  Getting requirements to build wheel: started
  Getting requirements to build wheel: finished with status 'error'
  error: subprocess-exited-with-error

  Getting requirements to build wheel did not run successfully.
  exit code: 1

  [31 lines of output]
  Traceback (most recent call last):
    File "C:\Users\MyUsername\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\MyUsername\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\MyUsername\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\MyUsername\AppData\Local\Temp\pip-build-env-er19ozeu\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\MyUsername\AppData\Local\Temp\pip-build-env-er19ozeu\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
      self.run_setup()
    File "C:\Users\MyUsername\AppData\Local\Temp\pip-build-env-er19ozeu\overlay\Lib\site-packages\setuptools\build_meta.py", line 480, in run_setup
      super().run_setup(setup_script=setup_script)
    File "C:\Users\MyUsername\AppData\Local\Temp\pip-build-env-er19ozeu\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
      exec(code, locals())
    File "<string>", line 126, in <module>
    File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 408, in check_call
      retcode = call(*popenargs, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 389, in call
      with Popen(*popenargs, **kwargs) as p:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 1026, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "C:\Users\MyUsername\AppData\Local\Programs\Python\Python312\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: 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.

MyUsername@COMPUTERNAME MINGW64 /a/nucleo-ai (main)
$

Oh yeah, I've looked into the /bin/ folder and it has three other folders in it: Include Lib and Scripts. I found a bunch of files named activate in the Scripts folder, is that right? Since there doesn't seem to be a bin folder where it's expecting those files.

One last thing: I didn't do git clone git@github.com:AndrewVeee/nucleo-ai.git because the terminal warned me about an error with the repository (told me about a possible man-in-the-middle attack), so instead I ran git clone https://github.com/AndrewVeee/nucleo-ai since I figured it'd get me the same files. Just throwing this out there in case that might be causing issues.

AndrewVeee commented 4 months ago

I'm at a loss. I'll see if I have time to boot into windows today to try to install it myself. I noticed you're using mingw and I wonder if that could be an issue.

It looks like windows also has a different setup process for python venvs, but that shouldn't cause any failures. https://mothergeo-py.readthedocs.io/en/latest/development/how-to/venv-win.html

I would suggest WSL, but I don't know much about it either.

AndrewVeee commented 4 months ago

@Runo888 Ok, I got it working in Windows. Here are the steps I took:

  1. Uninstall python 3.12, then installed python 3.11.8 from https://www.python.org/downloads/windows/. At the first setup screen, I checked the box at the bottom to add python to my path.
  2. Downloaded the sentencepiece pre-compiled wheel from https://github.com/google/sentencepiece/releases/download/v0.1.99/sentencepiece-0.1.99-cp311-cp311-win_amd64.whl
  3. Restarted my shell, then ran pip install sentencepiece-0.1.99-cp311-cp311-win_amd64.whl # (from the dir where it was downloaded)
  4. After that, from the nucleo-ai dir, ran ./setup.sh, edited the data/config.toml file, then ./start.sh

It's a bit of a pain because the sentence-transformers needs sentencepiece, which pip builds from source. Installing the pre-built package for py 3.11 works around the issue.

Runo888 commented 4 months ago

Thanks! That did the trick.

AndrewVeee commented 4 months ago

Awesome! Not ideal, but at least there's a way to get it working!

After you've had a chance to play around, it would help a lot if you could leave some of your first impressions. If you're on reddit, here would be best: https://www.reddit.com/r/nucleoai/

Otherwise, a new issue or discussion here would work. I really want to know how far it is from a daily driver for everyone.

shiloh92 commented 4 months ago

Please fix.