Open rlondner opened 7 months ago
Thanks @rlondner for reporting the issue. Apparently there is something happening with setuptools in python 3.12. Please give it a try now
pip install git+https://github.com/abdeladim-s/pyllamacpp.git
If you are using Windows, please consider using WSL as well.
Thank you @abdeladim-s !
I got a bit further, but I still run into an error:
pip install git+https://github.com/abdeladim-s/pyllamacpp.git Collecting git+https://github.com/abdeladim-s/pyllamacpp.git Cloning https://github.com/abdeladim-s/pyllamacpp.git to h:\users\raphael\appdata\local\temp\pip-req-build-g87jc7sn Running command git clone --filter=blob:none --quiet https://github.com/abdeladim-s/pyllamacpp.git 'H:\Users\Raphael\AppData\Local\Temp\pip-req-build-g87jc7sn' Resolved https://github.com/abdeladim-s/pyllamacpp.git to commit 8a8078be363229318abcdb0d71830ba5d158a029 Running command git submodule update --init --recursive -q Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: pyllamacpp Building wheel for pyllamacpp (pyproject.toml) ... error error: subprocess-exited-with-error
× Building wheel for pyllamacpp (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [90 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.win-amd64-cpython-312 creating build\lib.win-amd64-cpython-312\pyllamacpp copying .\pyllamacpp\cli.py -> build\lib.win-amd64-cpython-312\pyllamacpp copying .\pyllamacpp\constants.py -> build\lib.win-amd64-cpython-312\pyllamacpp copying .\pyllamacpp\langchain_llm.py -> build\lib.win-amd64-cpython-312\pyllamacpp copying .\pyllamacpp\model.py -> build\lib.win-amd64-cpython-312\pyllamacpp copying .\pyllamacpp\utils.py -> build\lib.win-amd64-cpython-312\pyllamacpp copying .\pyllamacpp\webui.py -> build\lib.win-amd64-cpython-312\pyllamacpp copying .\pyllamacpp_logger.py -> build\lib.win-amd64-cpython-312\pyllamacpp copying .\pyllamacpp__init__.py -> build\lib.win-amd64-cpython-312\pyllamacpp running build_ext -- Building for: NMake Makefiles CMake Error at CMakeLists.txt:8 (project): Generator
NMake Makefiles
does not support platform specification, but platform
x64
was specified.
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
-- Configuring incomplete, errors occurred!
Traceback (most recent call last):
File "H:\Users\Raphael\OneDrive\Perso\Technical\AI\Training\GenAI\Activeloop\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 353, in <module>
main()
File "H:\Users\Raphael\OneDrive\Perso\Technical\AI\Training\GenAI\Activeloop\venv\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 "H:\Users\Raphael\OneDrive\Perso\Technical\AI\Training\GenAI\Activeloop\venv\Lib\site-packages\pip\_vendor\pyproject_hooks\_in_process\_in_process.py", line 251, in build_wheel
return _build_backend().build_wheel(wheel_directory, config_settings,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\build_meta.py", line 410, in build_wheel
return self._build_with_temp_dir(
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\build_meta.py", line 395, in _build_with_temp_dir
self.run_setup()
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
exec(code, locals())
File "<string>", line 132, in <module>
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\__init__.py", line 103, in setup
return distutils.core.setup(**attrs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 185, in setup
return run_commands(dist)
^^^^^^^^^^^^^^^^^^
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\_distutils\core.py", line 201, in run_commands
dist.run_commands()
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 969, in run_commands
self.run_command(cmd)
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
super().run_command(command)
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\wheel\bdist_wheel.py", line 368, in run
self.run_command("build")
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
super().run_command(command)
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\_distutils\command\build.py", line 131, in run
self.run_command(cmd_name)
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\_distutils\cmd.py", line 318, in run_command
self.distribution.run_command(command)
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\dist.py", line 963, in run_command
super().run_command(command)
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\_distutils\dist.py", line 988, in run_command
cmd_obj.run()
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\command\build_ext.py", line 89, in run
_build_ext.run(self)
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 345, in run
self.build_extensions()
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 467, in build_extensions
self._build_extensions_serial()
File "H:\Users\Raphael\AppData\Local\Temp\pip-build-env-23lglpo6\overlay\Lib\site-packages\setuptools\_distutils\command\build_ext.py", line 493, in _build_extensions_serial
self.build_extension(ext)
File "<string>", line 118, in build_extension
File "H:\Users\Raphael\AppData\Local\Programs\Python\Python312\Lib\subprocess.py", line 571, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmake', 'H:\\Users\\Raphael\\AppData\\Local\\Temp\\pip-req-build-g87jc7sn', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY=H:\\Users\\Raphael\\AppData\\Local\\Temp\\pip-req-build-g87jc7sn\\build\\lib.win-amd64-cpython-312\\', '-DPYTHON_EXECUTABLE=H:\\Users\\Raphael\\OneDrive\\Perso\\Technical\\AI\\Training\\GenAI\\Activeloop\\venv\\Scripts\\python.exe', '-DCMAKE_BUILD_TYPE=Release', '-DEXAMPLE_VERSION_INFO=2.4.2', '-A', 'x64', '-DCMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE=H:\\Users\\Raphael\\AppData\\Local\\Temp\\pip-req-build-g87jc7sn\\build\\lib.win-amd64-cpython-312']' returned non-zero exit status 1.
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for pyllamacpp Failed to build pyllamacpp ERROR: Could not build wheels for pyllamacpp, which is required to install pyproject.toml-based projects
@rlondner, what machine are you using ?
Please make sure that you can compile llama.cpp
before trying to build the project.
In any case, I've updated the github action and pushed a new version to PyPI, pre-built wheels for Python 3.12 should be available now. You can install it as usual:
pip install pyllamacpp==2.4.3
I get the following error message when running pip install pyllamacpp or pip install git+https://github.com/abdeladim-s/pyllamacpp.git:
pip install git+https://github.com/abdeladim-s/pyllamacpp.git Collecting git+https://github.com/abdeladim-s/pyllamacpp.git Cloning https://github.com/abdeladim-s/pyllamacpp.git to h:\users\raphael\appdata\local\temp\pip-req-build-glz0imed Running command git clone --filter=blob:none --quiet https://github.com/abdeladim-s/pyllamacpp.git 'H:\Users\Raphael\AppData\Local\Temp\pip-req-build-glz0imed' Resolved https://github.com/abdeladim-s/pyllamacpp.git to commit 40ae3baf6c70d7cb8c5cebb9ea58bd26fc454549 Running command git submodule update --init --recursive -q 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 ╰─> [161 lines of output] H:\Users\Raphael\AppData\Local\Temp\pip-build-env-a25gkb1p\overlay\Lib\site-packages\setuptools\config_apply_pyprojecttoml.py:76: _MissingDynamic:
description
defined outside ofpyproject.toml
is ignored. !!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.