Теперь мне нужно для установки модуля pytetgen (https://pypi.org/project/pytetgen/). Однако, когда я пытаюсь pip install pytetgen, установка завершается с ошибкой, говоря, что не удается найти модуль Cython. Но я могу вручную загрузить Cython из Python. И pip install Cython правильно сообщает мне, что модуль уже установлен. Моя переменная PYTHONPATH также, похоже, правильно указывает на модули, установленные spack.
Может ли кто-нибудь помочь мне устранить проблему дальше? Я, как и мои коллеги, в растерянности.
Похоже, что моя среда spack содержит правильный Python с необходимыми модулями:
Код: Выделить всё
$ spack find
==> In environment sierra_gcc
==> 10 root specs
[+] [email protected] [+] py-matplotlib [+] py-pandas [+] py-scikit-learn [+] python
[+] py-cython [+] py-numpy [+] py-pip [+] py-setuptools [+] seacas
-- linux-rhel8-icelake / [email protected] -----------------------------
[email protected] [email protected] parallel@20240822 [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
ca-certificates-mozilla@2023-05-30 [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] seacas@2024-08-15
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected] [email protected]
[email protected] [email protected] [email protected]
[email protected] [email protected] [email protected]
==> 122 installed packages
==> 0 concretized packages to be installed (show with `spack find -c`)
Код: Выделить всё
$ which python
~/spack/var/spack/environments/sierra_gcc/.spack-env/view/bin/python
Код: Выделить всё
$ python
Python 3.13.0 (main, Dec 3 2024, 14:21:56) [GCC 10.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import numpy as np
>>> from Cython import *
>>>
Код: Выделить всё
$ echo $PYTHONPATH
/home/tvj/spack/var/spack/environments/sierra_gcc/.spack-env/view/lib:/home/tvj/spack/var/spack/environments/sierra_gcc/.spack-env/view/lib/python3.13/site-packages:.
Код: Выделить всё
$ pip install Cython
Requirement already satisfied: Cython in ./spack/var/spack/environments/sierra_gcc/.spack-env/view/lib/python3.13/site-packages (3.0.11)
Код: Выделить всё
$ pip install pytetgen
Collecting pytetgen
Using cached pytetgen-0.2.2.tar.gz (409 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
╰─> [23 lines of output]
Traceback (most recent call last):
File "/home/tvj/spack/var/spack/environments/sierra_gcc/.spack-env/view/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 353, in
main()
~~~~^^
File "/home/tvj/spack/var/spack/environments/sierra_gcc/.spack-env/view/lib/python3.13/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/tvj/spack/var/spack/environments/sierra_gcc/.spack-env/view/lib/python3.13/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 118, in get_requires_for_build_wheel
return hook(config_settings)
File "/tmp/pip-build-env-yzg25sy8/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 334, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-yzg25sy8/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 304, in _get_build_requires
self.run_setup()
~~~~~~~~~~~~~~^^
File "/tmp/pip-build-env-yzg25sy8/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 522, in run_setup
super().run_setup(setup_script=setup_script)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/tmp/pip-build-env-yzg25sy8/overlay/lib/python3.13/site-packages/setuptools/build_meta.py", line 320, in run_setup
exec(code, locals())
~~~~^^^^^^^^^^^^^^^^
File "", line 5, in
ModuleNotFoundError: No module named 'Cython'
[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.
[notice] A new release of pip is available: 23.1.2 -> 24.3.1
[notice] To update, run: python3 -m pip install --upgrade pip
Я отмечаю, что pytetgen, похоже, использует distutils в установочном файле. Может ли это быть связано с проблемой?
Подробнее здесь: https://stackoverflow.com/questions/792 ... thon-shows