Created attachment 824645 [details] build.log Scipy 1.9.1 built and installed so this is not a blocker for me. However 1.9.2 has not built. Log and info attached. The log references an inability to import numpy. I did try reinstalling numpy, and numpy works from python so I conclude this is a problem in the build itself. The relevant part of the log file (for quick reference) is >>> Failed to emerge dev-python/scipy-1.9.2, Log file: >>> '/var/tmp/portage/dev-python/scipy-1.9.2/temp/build.log' * Messages for package dev-python/scipy-1.9.2: * ERROR: dev-python/scipy-1.9.2::gentoo failed (compile phase): * Wheel build failed * * Call stack: * ebuild.sh, line 122: Called src_compile * environment, line 3546: Called distutils-r1_src_compile * environment, line 1745: Called _distutils-r1_run_foreach_impl 'distutils-r1_python_compile' * environment, line 749: Called python_foreach_impl 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 3232: Called multibuild_foreach_variant '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 2791: Called _multibuild_run '_python_multibuild_wrapper' 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 2789: Called _python_multibuild_wrapper 'distutils-r1_run_phase' 'distutils-r1_python_compile' * environment, line 1218: Called distutils-r1_run_phase 'distutils-r1_python_compile' * environment, line 1727: Called distutils-r1_python_compile * environment, line 1551: Called distutils_pep517_install '/var/tmp/portage/dev-python/scipy-1.9.2/work/scipy-1.9.2-python3_9/install' * environment, line 2050: Called die * The specific snippet of code: * [[ -n ${wheel} ]] || die "No wheel name returned"; * * If you need support, post the output of `emerge --info '=dev-python/scipy-1.9.2::gentoo'`, * the complete build log and the output of `emerge -pqv '=dev-python/scipy-1.9.2::gentoo'`. * The complete build log is located at '/var/tmp/portage/dev-python/scipy-1.9.2/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/dev-python/scipy-1.9.2/temp/environment'. * Working directory: '/var/tmp/portage/dev-python/scipy-1.9.2/work/scipy-1.9.2' * S: '/var/tmp/portage/dev-python/scipy-1.9.2/work/scipy-1.9.2' * * The following package has failed to build, install, or execute postinst: * * (dev-python/scipy-1.9.2:0/0::gentoo, ebuild scheduled for merge), Log file: * '/var/tmp/portage/dev-python/scipy-1.9.2/temp/build.log' *
Created attachment 824647 [details] emerge --info on package
Program python found: YES (/usr/bin/python3.9) Found pkg-config: /usr/bin/pkg-config (1.8.0) ../../scipy/meson.build:38:0: ERROR: Command "/usr/bin/python3.9 -c import os; os.chdir(".."); import numpy; print(numpy.get_include())" failed with status 1. A full log can be found at /var/tmp/portage/dev-python/scipy-1.9.2/work/scipy-1.9.2/.mesonpy-2pon_lut/build/meson-logs/meson-log.txt Traceback (most recent call last): What happens when you run: /usr/bin/python3.9 -c import os; os.chdir(".."); import numpy; print(numpy.get_include()) If you try 3.10 and 3.11, do you get the same result?
chris /etc/portage/package.use # /usr/bin/python3.9 -c "import os; os.chdir(".."); import numpy; print(numpy.get_include())" File "<string>", line 1 import os; os.chdir(..); import numpy; print(numpy.get_include()) ^ SyntaxError: invalid syntax chris /etc/portage/package.use # /usr/bin/python3.10 -c "import os; os.chdir(".."); import numpy; print(numpy.get_include())" File "<string>", line 1 import os; os.chdir(..); import numpy; print(numpy.get_include()) ^ SyntaxError: invalid syntax chris /etc/portage/package.use # /usr/bin/python3.11 -c "import os; os.chdir(".."); import numpy; print(numpy.get_include())" File "<string>", line 1 import os; os.chdir(..); import numpy; print(numpy.get_include()) ^ SyntaxError: invalid syntax
Never mind, my quotes were messed up on the last one. This actually is stranger. The command succeeds from bash for Python 3.9 and 3.10 but fails on 3.11 with Numpy not being found chris /etc/portage/package.use # /usr/bin/python3.11 -c 'import os; os.chdir(".."); import numpy; print(numpy.get_include())' Traceback (most recent call last): File "<string>", line 1, in <module> ModuleNotFoundError: No module named 'numpy' chris /etc/portage/package.use # /usr/bin/python3.10 -c 'import os; os.chdir(".."); import numpy; print(numpy.get_include())' /root/.local/lib/python3.10/site-packages/numpy/core/include chris /etc/portage/package.use # /usr/bin/python3.9 -c 'import os; os.chdir(".."); import numpy; print(numpy.get_include())' /usr/lib/python3.9/site-packages/numpy/core/include
Maybe related to bug 858425.
The same problem. Solved by emerge scipy without su (from root). It's possible, meson conflicts with user PYTHONPATH (I define PYTHONPATH for me).
(In reply to Aleksander Zatserkovnyy from comment #6) > The same problem. > Solved by emerge scipy without su (from root). It's possible, meson > conflicts with user PYTHONPATH (I define PYTHONPATH for me). I have the same problem and i can support Aleksanders hypotheses that PYTHONPATH has something to do with it. I have PYTHONPATH defined and got the error, PYTHONPATH="" emerge -av scipy solved the problem for me.
Same here: PYTHONPATH="" emerge -1 =dev-python/scipy-1.9.2 fixed it.
Update: After the world rebuild completed, it re-builds without issue.
Yes, I suspect it finding stuff from /root/.local isn't the best way to build it. However, I'm not sure that we want to reset PYTHONPATH since people may have valid use cases for overriding it.