Summary: | dev-python/scipy 1.9.2 fails to build | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Chris Travers <Chris.travers> |
Component: | Current packages | Assignee: | Gentoo Science Related Packages <sci> |
Status: | UNCONFIRMED --- | ||
Severity: | normal | CC: | mgorny, python, sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=858425 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
build.log
emerge --info on package |
Description
Chris Travers
2022-10-18 00:41:05 UTC
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. |