pylbfgs
pylbfgs copied to clipboard
pip installation problem
Opening a completely fresh directory and trying to install pylbfgs
fails.
$ python3 -m venv env --prompt proj@testing
$ source env/bin/activate
(proj@testing) $ python --version
Python 3.11.3
(proj@testing) $ pip install --upgrade pip
Requirement already satisfied: pip in ./env/lib/python3.11/site-packages (23.0.1)
Collecting pip
Using cached pip-23.2-py3-none-any.whl (2.1 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 23.0.1
Uninstalling pip-23.0.1:
Successfully uninstalled pip-23.0.1
Successfully installed pip-23.2
(proj@testing) $ pip install pylbfgs
Collecting pylbfgs
Using cached PyLBFGS-0.2.0.14.tar.gz (98 kB)
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
╰─> [57 lines of output]
/private/var/folders/jg/pb4kddl17kzf4njent3ht8rh0000gn/T/pip-build-env-bemxqhla/overlay/lib/python3.11/site-packages/Cython/Compiler/Main.py:381: FutureWarning: Cython directive 'language_level' not set, using '3str' for now (Py3). This has changed from earlier releases! File: /private/var/folders/jg/pb4kddl17kzf4njent3ht8rh0000gn/T/pip-install-9efii02m/pylbfgs_642bfcdecb0e483c9161a5cf7c9875f6/lbfgs/_lowlevel.pyx
tree = Parsing.p_module(s, pxd, full_module_name)
Error compiling Cython file:
------------------------------------------------------------
...
x_a = aligned_copy(x0.ravel())
try:
callback_data = (f, progress, x0.shape, args)
r = lbfgs(n, x_a, fx_final, call_eval,
^
------------------------------------------------------------
lbfgs/_lowlevel.pyx:395:40: Cannot assign type 'lbfgsfloatval_t (void *, lbfgsconst_p, lbfgsfloatval_t *, int, lbfgsfloatval_t) except? -1' to 'lbfgs_evaluate_t'
Error compiling Cython file:
------------------------------------------------------------
...
x_a = aligned_copy(x0.ravel())
try:
callback_data = (f, progress, x0.shape, args)
r = lbfgs(n, x_a, fx_final, call_eval,
call_progress, <void *>callback_data, &self.params)
^
------------------------------------------------------------
lbfgs/_lowlevel.pyx:396:22: Cannot assign type 'int (void *, lbfgsconst_p, lbfgsconst_p, lbfgsfloatval_t, lbfgsfloatval_t, lbfgsfloatval_t, lbfgsfloatval_t, int, int, int) except? -1' to 'lbfgs_progress_t'
Compiling lbfgs/_lowlevel.pyx because it changed.
[1/1] Cythonizing lbfgs/_lowlevel.pyx
Traceback (most recent call last):
File "/Users/bufas/dev/proj/testing/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/Users/bufas/dev/proj/testing/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 335, in main
json_out['return_val'] = hook(**hook_input['kwargs'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/bufas/dev/proj/testing/env/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/jg/pb4kddl17kzf4njent3ht8rh0000gn/T/pip-build-env-bemxqhla/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 341, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=['wheel'])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/jg/pb4kddl17kzf4njent3ht8rh0000gn/T/pip-build-env-bemxqhla/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 323, in _get_build_requires
self.run_setup()
File "/private/var/folders/jg/pb4kddl17kzf4njent3ht8rh0000gn/T/pip-build-env-bemxqhla/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 488, in run_setup
self).run_setup(setup_script=setup_script)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/private/var/folders/jg/pb4kddl17kzf4njent3ht8rh0000gn/T/pip-build-env-bemxqhla/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 27, in <module>
File "/private/var/folders/jg/pb4kddl17kzf4njent3ht8rh0000gn/T/pip-build-env-bemxqhla/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1134, in cythonize
cythonize_one(*args)
File "/private/var/folders/jg/pb4kddl17kzf4njent3ht8rh0000gn/T/pip-build-env-bemxqhla/overlay/lib/python3.11/site-packages/Cython/Build/Dependencies.py", line 1301, in cythonize_one
raise CompileError(None, pyx_file)
Cython.Compiler.Errors.CompileError: lbfgs/_lowlevel.pyx
[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.
(proj@testing) $