-
Notifications
You must be signed in to change notification settings - Fork 75
problems with installation on Python 3.11 #174
Description
Hi! In Python 3.11, the installation does not seem to work

(venv) localcreator@localcreator-hp:~/pythonProject$ pip install fracdiff
Collecting fracdiff
Downloading fracdiff-0.6.0-py3-none-any.whl (13 kB)
Requirement already satisfied: numpy<2.0.0,>=1.18.0 in ./venv/lib/python3.11/site-packages (from fracdiff) (1.25.0)
Collecting scikit-learn<0.25.0,>=0.24.0
Downloading scikit-learn-0.24.2.tar.gz (7.5 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 7.5/7.5 MB 1.4 MB/s eta 0:00:00
Installing build dependencies ... done
Getting requirements to build wheel ... done
Preparing metadata (pyproject.toml) ... error
error: subprocess-exited-with-error
× Preparing metadata (pyproject.toml) did not run successfully.
│ exit code: 1
╰─> [73 lines of output]
:17: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
Partial import of sklearn during the build process.
:116: DeprecationWarning:
`numpy.distutils` is deprecated since NumPy 1.23.0, as a result
of the deprecation of `distutils` itself. It will be removed for
Python >= 3.12. For older Python versions it will remain present.
It is recommended to use `setuptools < 60.0` for those Python versions.
For more details, see:
https://numpy.org/devdocs/reference/distutils_status_migration.html
INFO: C compiler: x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC
INFO: compile options: '-c'
INFO: x86_64-linux-gnu-gcc: test_program.c
[Errno 2] No such file or directory: 'x86_64-linux-gnu-gcc'
Traceback (most recent call last):
File "/home/localcreator/pythonProject/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in <module>
main()
File "/home/localcreator/pythonProject/venv/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 "/home/localcreator/pythonProject/venv/lib/python3.11/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 149, in prepare_metadata_for_build_wheel
return hook(metadata_directory, config_settings)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ug1kwehm/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 380, in prepare_metadata_for_build_wheel
self.run_setup()
File "/tmp/pip-build-env-ug1kwehm/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 488, in run_setup
self).run_setup(setup_script=setup_script)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ug1kwehm/overlay/lib/python3.11/site-packages/setuptools/build_meta.py", line 338, in run_setup
exec(code, locals())
File "<string>", line 301, in <module>
File "<string>", line 297, in setup_package
File "/tmp/pip-build-env-ug1kwehm/overlay/lib/python3.11/site-packages/numpy/distutils/core.py", line 135, in setup
config = configuration()
^^^^^^^^^^^^^^^
File "<string>", line 188, in configuration
File "/tmp/pip-build-env-ug1kwehm/overlay/lib/python3.11/site-packages/numpy/distutils/misc_util.py", line 1050, in add_subpackage
config_list = self.get_subpackage(subpackage_name, subpackage_path,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ug1kwehm/overlay/lib/python3.11/site-packages/numpy/distutils/misc_util.py", line 1016, in get_subpackage
config = self._get_configuration_from_setup_py(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ug1kwehm/overlay/lib/python3.11/site-packages/numpy/distutils/misc_util.py", line 958, in _get_configuration_from_setup_py
config = setup_module.configuration(*args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-install-our_u18v/scikit-learn_950f7f89433040a78a59d64776b761d8/sklearn/setup.py", line 83, in configuration
cythonize_extensions(top_path, config)
File "/tmp/pip-install-our_u18v/scikit-learn_950f7f89433040a78a59d64776b761d8/sklearn/_build_utils/__init__.py", line 45, in cythonize_extensions
basic_check_build()
File "/tmp/pip-install-our_u18v/scikit-learn_950f7f89433040a78a59d64776b761d8/sklearn/_build_utils/pre_build_helpers.py", line 106, in basic_check_build
compile_test_program(code)
File "/tmp/pip-install-our_u18v/scikit-learn_950f7f89433040a78a59d64776b761d8/sklearn/_build_utils/pre_build_helpers.py", line 66, in compile_test_program
ccompiler.compile(['test_program.c'], output_dir='objects',
File "/tmp/pip-build-env-ug1kwehm/overlay/lib/python3.11/site-packages/numpy/distutils/ccompiler.py", line 91, in <lambda>
m = lambda self, *args, **kw: func(self, *args, **kw)
^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ug1kwehm/overlay/lib/python3.11/site-packages/numpy/distutils/ccompiler.py", line 369, in CCompiler_compile
single_compile(o)
File "/tmp/pip-build-env-ug1kwehm/overlay/lib/python3.11/site-packages/numpy/distutils/ccompiler.py", line 328, in single_compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/tmp/pip-build-env-ug1kwehm/overlay/lib/python3.11/site-packages/numpy/distutils/ccompiler.py", line 91, in <lambda>
m = lambda self, *args, **kw: func(self, *args, **kw)
^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-ug1kwehm/overlay/lib/python3.11/site-packages/numpy/distutils/unixccompiler.py", line 58, in UnixCCompiler__compile
raise CompileError(msg) from None
distutils.errors.CompileError: Command "x86_64-linux-gnu-gcc -Wsign-compare -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -g -fwrapv -O2 -fPIC -c test_program.c -o objects/test_program.o" failed with exit status 127
[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.
PS. This solution helped: pip install git+https://github.com/fracdiff/fracdiff.git