Pomoc ze środowiskiem Pythona.

Łukasz Maśko masko w ipipan.waw.pl
Czw, 2 Cze 2022, 21:15:19 CEST


Od razu zaznaczę, że nie znam się na Pythonie ni w ząb. A napotkałem na jakiś 
problem z naszą instalacją, która nie pozwala mi skompilować paczki softu dla 
Greaseweazle. Efekt jest taki (wiem, że długie ale wklejam całość bo nic z 
tego nie rozumiem):

$ python3 -m pip install .
Defaulting to user installation because normal site-packages is not writeable
Processing /home/users/ed/Pobieranie/greaseweazle-0.42
  Installing build dependencies ... done
  WARNING: Missing build requirements in pyproject.toml for file:///home/
users/ed/Pobieranie/greaseweazle-0.42.
  WARNING: The project does not specify a build backend, and pip cannot fall 
back to setuptools without 'setuptools>=40.8.0' and 'wheel'.
  Getting requirements to build wheel ... done
ERROR: Exception:
Traceback (most recent call last):
  File "/usr/share/python3.10/site-packages/pip/_internal/cli/
base_command.py", line 223, in _main
    status = self.run(options, args)
  File "/usr/share/python3.10/site-packages/pip/_internal/cli/req_command.py", 
line 180, in wrapper
    return func(self, options, args)
  File "/usr/share/python3.10/site-packages/pip/_internal/commands/
install.py", line 320, in run
    requirement_set = resolver.resolve(
  File "/usr/share/python3.10/site-packages/pip/_internal/resolution/
resolvelib/resolver.py", line 100, in resolve
    r = self.factory.make_requirement_from_install_req(
  File "/usr/share/python3.10/site-packages/pip/_internal/resolution/
resolvelib/factory.py", line 306, in make_requirement_from_install_req
    cand = self._make_candidate_from_link(
  File "/usr/share/python3.10/site-packages/pip/_internal/resolution/
resolvelib/factory.py", line 167, in _make_candidate_from_link
    self._link_candidate_cache[link] = LinkCandidate(
  File "/usr/share/python3.10/site-packages/pip/_internal/resolution/
resolvelib/candidates.py", line 296, in __init__
    super(LinkCandidate, self).__init__(
  File "/usr/share/python3.10/site-packages/pip/_internal/resolution/
resolvelib/candidates.py", line 144, in __init__
    self.dist = self._prepare()
  File "/usr/share/python3.10/site-packages/pip/_internal/resolution/
resolvelib/candidates.py", line 222, in _prepare
    dist = self._prepare_distribution()
  File "/usr/share/python3.10/site-packages/pip/_internal/resolution/
resolvelib/candidates.py", line 307, in _prepare_distribution
    return self._factory.preparer.prepare_linked_requirement(
  File "/usr/share/python3.10/site-packages/pip/_internal/operations/
prepare.py", line 480, in prepare_linked_requirement
    return self._prepare_linked_requirement(req, parallel_builds)
  File "/usr/share/python3.10/site-packages/pip/_internal/operations/
prepare.py", line 523, in _prepare_linked_requirement
    dist = _get_prepared_distribution(
  File "/usr/share/python3.10/site-packages/pip/_internal/operations/
prepare.py", line 88, in _get_prepared_distribution
    abstract_dist.prepare_distribution_metadata(finder, build_isolation)
  File "/usr/share/python3.10/site-packages/pip/_internal/distributions/
sdist.py", line 39, in prepare_distribution_metadata
    self._setup_isolation(finder)
  File "/usr/share/python3.10/site-packages/pip/_internal/distributions/
sdist.py", line 97, in _setup_isolation
    reqs = backend.get_requires_for_build_wheel()
  File "/usr/share/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", 
line 177, in get_requires_for_build_wheel
    return self._call_hook('get_requires_for_build_wheel', {
  File "/usr/share/python3.10/site-packages/pip/_vendor/pep517/wrappers.py", 
line 284, in _call_hook
    raise BackendUnavailable(data.get('traceback', ''))
pip._vendor.pep517.wrappers.BackendUnavailable: Traceback (most recent call 
last):
  File "/usr/share/python3.10/site-packages/pip/_vendor/pep517/
_in_process.py", line 86, in _build_backend
    obj = import_module(mod_path)
  File "/usr/lib64/python3.10/importlib/__init__.py", line 126, in 
import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 992, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'setuptools'


Tyle tylko, że:
$ rpm -qa | grep -E "python3-(setuptools|wheel)"
python3-setuptools-62.0.0-2.noarch
python3-wheel-0.37.1-3.noarch
python3-setuptools_git-1.2-6.noarch
python3-setuptools_scm-6.0.1-1.noarch

Czy da się z tego loga wywnioskować, czego brakuje? Jedyna sugestia autora 
softu jest taka: "This looks pretty broken. No setuptools but you have 
setuptools... maybe investigate pyenv and install yourself a pristine python3 
environment and try within that." - niezbyt pomocna.
-- 
Łukasz Maśko                                                            _o)
Lukasz.Masko(at)ipipan.waw.pl                                           /\\
Registered Linux User #61028                                           _\_V
Ubuntu: staroafrykańskie słowo oznaczające "Nie umiem zainstalować Debiana"





Więcej informacji o liście pld-users-pl