Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

numpy.disutils not found #39331

Open
2 tasks done
beew opened this issue Jan 16, 2025 · 1 comment
Open
2 tasks done

numpy.disutils not found #39331

beew opened this issue Jan 16, 2025 · 1 comment

Comments

@beew
Copy link

beew commented Jan 16, 2025

Environment

  • OS: Ubuntu 24.04.1
  • Sage Version: 10.5

Steps To Reproduce

run

./configure

enable some packages that require setuptools e.g scs, then

make build 

then it failed with

ModuleNotFoundError: No module named 'numpy.distutils'

Config log

config.log

Package logs

scs-3.2.3.log

Additional Information

Ubuntu 24.04's python version is 3.12 where numpy.disutils is deprecated. I think overriding system's python3 and use the SPKG version in the configure step would fix it, but I am not sure how to do it.

https://numpy.org/doc/2.1/reference/distutils_status_migration.html

Thanks.

Checklist

  • I have searched the existing issues for a bug report that matches the one I want to file, without success.
  • I have read the documentation and troubleshoot guide
@beew
Copy link
Author

beew commented Jan 17, 2025

Add the options

--with-system-python3=no  --with-system-python_build=no 

Reconfigure confirms that the SPKG version is installed

python3:             no; standard, SPKG version 3.12.5 is already installed

But make build still failed with the same error. (python version in SPKG is > 3.12 as well)


[scs-3.2.3] [spkg-install] * Creating isolated environment: venv+pip...
[scs-3.2.3] [spkg-install] * Installing packages in isolated environment:
[scs-3.2.3] [spkg-install]   - numpy
[scs-3.2.3] [spkg-install]   - setuptools
[scs-3.2.3] [spkg-install]   - wheel
[scs-3.2.3] [spkg-install] * Getting build dependencies for wheel...
[scs-3.2.3] [spkg-install] Namespace(scs=False, gpu=False, mkl=False, openmp=False, float32=False, extraverbose=False, gpu_atrans=True, int32=False, blas64=False)
[scs-3.2.3] [spkg-install] * Installing packages in isolated environment:
[scs-3.2.3] [spkg-install]   - numpy >= 1.7
[scs-3.2.3] [spkg-install] * Building wheel...
[scs-3.2.3] [spkg-install] Namespace(scs=False, gpu=False, mkl=False, openmp=False, float32=False, extraverbose=False, gpu_atrans=True, int32=False, blas64=False)
[scs-3.2.3] [spkg-install] running bdist_wheel
[scs-3.2.3] [spkg-install] running build
[scs-3.2.3] [spkg-install] running build_py
[scs-3.2.3] [spkg-install] creating build
[scs-3.2.3] [spkg-install] creating build/lib.linux-x86_64-cpython-312
[scs-3.2.3] [spkg-install] creating build/lib.linux-x86_64-cpython-312/scs
[scs-3.2.3] [spkg-install] copying src/__init__.py -> build/lib.linux-x86_64-cpython-312/scs
[scs-3.2.3] [spkg-install] running build_ext
[scs-3.2.3] [spkg-install] Traceback (most recent call last):
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
[scs-3.2.3] [spkg-install]     main()
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
[scs-3.2.3] [spkg-install]     json_out["return_val"] = hook(**hook_input["kwargs"])
[scs-3.2.3] [spkg-install]                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 271, in build_wheel
[scs-3.2.3] [spkg-install]     return _build_backend().build_wheel(
[scs-3.2.3] [spkg-install]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/build_meta.py", line 420, in build_wheel
[scs-3.2.3] [spkg-install]     return self._build_with_temp_dir(
[scs-3.2.3] [spkg-install]            ^^^^^^^^^^^^^^^^^^^^^^^^^^
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/build_meta.py", line 402, in _build_with_temp_dir
[scs-3.2.3] [spkg-install]     self.run_setup()
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/build_meta.py", line 318, in run_setup
[scs-3.2.3] [spkg-install]     exec(code, locals())
[scs-3.2.3] [spkg-install]   File "<string>", line 313, in <module>
[scs-3.2.3] [spkg-install]   File "<string>", line 285, in install_scs
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/__init__.py", line 111, in setup
[scs-3.2.3] [spkg-install]     return distutils.core.setup(**attrs)
[scs-3.2.3] [spkg-install]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
[scs-3.2.3] [spkg-install]     return run_commands(dist)
[scs-3.2.3] [spkg-install]            ^^^^^^^^^^^^^^^^^^
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
[scs-3.2.3] [spkg-install]     dist.run_commands()
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 964, in run_commands
[scs-3.2.3] [spkg-install]     self.run_command(cmd)
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/dist.py", line 948, in run_command
[scs-3.2.3] [spkg-install]     super().run_command(command)
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 983, in run_command
[scs-3.2.3] [spkg-install]     cmd_obj.run()
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 384, in run
[scs-3.2.3] [spkg-install]     self.run_command("build")
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
[scs-3.2.3] [spkg-install]     self.distribution.run_command(command)
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/dist.py", line 948, in run_command
[scs-3.2.3] [spkg-install]     super().run_command(command)
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 983, in run_command
[scs-3.2.3] [spkg-install]     cmd_obj.run()
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 135, in run
[scs-3.2.3] [spkg-install]     self.run_command(cmd_name)
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
[scs-3.2.3] [spkg-install]     self.distribution.run_command(command)
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/dist.py", line 948, in run_command
[scs-3.2.3] [spkg-install]     super().run_command(command)
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 982, in run_command
[scs-3.2.3] [spkg-install]     cmd_obj.ensure_finalized()
[scs-3.2.3] [spkg-install]   File "/tmp/build-env-4whq5rd8/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
[scs-3.2.3] [spkg-install]     self.finalize_options()
[scs-3.2.3] [spkg-install]   File "<string>", line 142, in finalize_options
[scs-3.2.3] [spkg-install]   File "<string>", line 97, in get_infos
[scs-3.2.3] [spkg-install] ModuleNotFoundError: No module named 'numpy.distutils'
[scs-3.2.3] [spkg-install] 
[scs-3.2.3] [spkg-install] ERROR Backend subprocess exited when trying to invoke build_wheel
[scs-3.2.3] [spkg-install] Warning: building with "python3 -m build --wheel --outdir=dist   ." failed.
[scs-3.2.3] [spkg-install] Retrying with "python3 -m build --wheel --outdir=dist --no-isolation --skip-dependency-check  .".
[scs-3.2.3] [spkg-install] * Building wheel...
[scs-3.2.3] [spkg-install] Namespace(scs=False, gpu=False, mkl=False, openmp=False, float32=False, extraverbose=False, gpu_atrans=True, int32=False, blas64=False)
[scs-3.2.3] [spkg-install] running bdist_wheel
[scs-3.2.3] [spkg-install] running build
[scs-3.2.3] [spkg-install] running build_py
[scs-3.2.3] [spkg-install] copying src/__init__.py -> build/lib.linux-x86_64-cpython-312/scs
[scs-3.2.3] [spkg-install] running build_ext
[scs-3.2.3] [spkg-install] Traceback (most recent call last):
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 373, in <module>
[scs-3.2.3] [spkg-install]     main()
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 357, in main
[scs-3.2.3] [spkg-install]     json_out["return_val"] = hook(**hook_input["kwargs"])
[scs-3.2.3] [spkg-install]                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/pyproject_hooks/_in_process/_in_process.py", line 271, in build_wheel
[scs-3.2.3] [spkg-install]     return _build_backend().build_wheel(
[scs-3.2.3] [spkg-install]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/build_meta.py", line 420, in build_wheel
[scs-3.2.3] [spkg-install]     return self._build_with_temp_dir(
[scs-3.2.3] [spkg-install]            ^^^^^^^^^^^^^^^^^^^^^^^^^^
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/build_meta.py", line 402, in _build_with_temp_dir
[scs-3.2.3] [spkg-install]     self.run_setup()
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/build_meta.py", line 318, in run_setup
[scs-3.2.3] [spkg-install]     exec(code, locals())
[scs-3.2.3] [spkg-install]   File "<string>", line 313, in <module>
[scs-3.2.3] [spkg-install]   File "<string>", line 285, in install_scs
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/__init__.py", line 111, in setup
[scs-3.2.3] [spkg-install]     return distutils.core.setup(**attrs)
[scs-3.2.3] [spkg-install]            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 184, in setup
[scs-3.2.3] [spkg-install]     return run_commands(dist)
[scs-3.2.3] [spkg-install]            ^^^^^^^^^^^^^^^^^^
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/_distutils/core.py", line 200, in run_commands
[scs-3.2.3] [spkg-install]     dist.run_commands()
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 964, in run_commands
[scs-3.2.3] [spkg-install]     self.run_command(cmd)
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/dist.py", line 948, in run_command
[scs-3.2.3] [spkg-install]     super().run_command(command)
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 983, in run_command
[scs-3.2.3] [spkg-install]     cmd_obj.run()
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/command/bdist_wheel.py", line 384, in run
[scs-3.2.3] [spkg-install]     self.run_command("build")
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
[scs-3.2.3] [spkg-install]     self.distribution.run_command(command)
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/dist.py", line 948, in run_command
[scs-3.2.3] [spkg-install]     super().run_command(command)
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 983, in run_command
[scs-3.2.3] [spkg-install]     cmd_obj.run()
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/_distutils/command/build.py", line 135, in run
[scs-3.2.3] [spkg-install]     self.run_command(cmd_name)
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 316, in run_command
[scs-3.2.3] [spkg-install]     self.distribution.run_command(command)
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/dist.py", line 948, in run_command
[scs-3.2.3] [spkg-install]     super().run_command(command)
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/_distutils/dist.py", line 982, in run_command
[scs-3.2.3] [spkg-install]     cmd_obj.ensure_finalized()
[scs-3.2.3] [spkg-install]   File "/home/mb/opt/sagemath/local/var/lib/sage/venv-python3.12.5/lib/python3.12/site-packages/setuptools/_distutils/cmd.py", line 111, in ensure_finalized
[scs-3.2.3] [spkg-install]     self.finalize_options()
[scs-3.2.3] [spkg-install]   File "<string>", line 142, in finalize_options
[scs-3.2.3] [spkg-install]   File "<string>", line 97, in get_infos
[scs-3.2.3] [spkg-install] ModuleNotFoundError: No module named 'numpy.distutils'
[scs-3.2.3] [spkg-install] 
[scs-3.2.3] [spkg-install] ERROR Backend subprocess exited when trying to invoke build_wheel
[scs-3.2.3] [spkg-install] **************************************************************************************************************************************************************************************************************************************************************
[scs-3.2.3] [spkg-install] Error building a wheel for scs-3.2.3
[scs-3.2.3] [spkg-install] ***************************************************

@beew beew changed the title disutils not found numpy.disutils not found Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant