Skip to content

External py-pip not working #50827

@vbrunini

Description

@vbrunini

Steps to reproduce

Checkout develop and create an environment with external python and py-pip similar to:

spack:
  # add package specs to the `specs` list
  specs:
  - py-affine
  view: false
  concretizer:
    unify: true
  packages:
    gcc:
      externals:
      - spec: gcc@8.5.0 languages:='c,c++,fortran'
        prefix: /usr
        extra_attributes:
          compilers:
            c: /usr/bin/gcc
            cxx: /usr/bin/g++
            fortran: /usr/bin/gfortran
    python:
      externals:
      - spec: python@3.11.5
        prefix: /path/to/python
      buildable: false
    py-pip:
      externals:
      - spec: py-pip@24.0
        prefix: /path/to/python
      buildable: false

Activate the environment, concretize, and attempt to install.

Error message

spack install
[+] /projects/aue/cee/deploy/ed0e84f4/linux-rhel8-x86_64/gcc-12.3.0/anaconda3-2024.06-1-jxxucpn/pip-24.0-py312h06a4308_0/ (external py-pip-24.0-oxahuiq3wzdoq73pxzovrlake3zdrq3s)
[+] /projects/aue/cee/deploy/ed0e84f4/linux-rhel8-x86_64/gcc-12.3.0/anaconda3-2024.06-1-jxxucpn (external python-3.11.5-iu5w42oguwbzpvmyj5yqmigtmflwvue3)
==> No binary for python-venv-1.0-yloall5oxnacenws4r73ke2axgmnlfab found: installing from source
==> Installing python-venv-1.0-yloall5oxnacenws4r73ke2axgmnlfab [3/6]
==> No patches needed for python-venv
==> python-venv: Executing phase: 'install'
==> python-venv: Successfully installed python-venv-1.0-yloall5oxnacenws4r73ke2axgmnlfab
  Stage: 0.00s.  Install: 0.19s.  Post-install: 0.02s.  Total: 0.22s
[+] /scratch/vebruni/src/spack/opt/spack/linux-icelake/python-venv-1.0-yloall5oxnacenws4r73ke2axgmnlfab
==> No binary for py-setuptools-79.0.1-b2emwlsvbx4p7gzeznirp3hxd6ut7vqh found: installing from source
==> Installing py-setuptools-79.0.1-b2emwlsvbx4p7gzeznirp3hxd6ut7vqh [4/6]
==> No binary for py-wheel-0.45.1-bmr6qqi6nn6xn6ngl6mkea3vzfg3yw52 found: installing from source
==> Installing py-wheel-0.45.1-bmr6qqi6nn6xn6ngl6mkea3vzfg3yw52 [5/6]
==> Error: NameError: name 'python' is not defined

/scratch/vebruni/src/spack/user-cache/package_repos/fncqgg4/repos/spack_repo/builtin/packages/py_pip/package.py:108, in setup_dependent_package:
        107    def setup_dependent_package(self, module, dependent_spec: Spec):
  >>    108        setattr(module, "pip", python.with_default_args("-m", "pip"))


==> Warning: Skipping build of py-affine-2.1.0-qneewrxfasszzhektx5x2bp5u4ym5fjm since py-setuptools-79.0.1-b2emwlsvbx4p7gzeznirp3hxd6ut7vqh failed
==> Error: NameError: name 'python' is not defined

/scratch/vebruni/src/spack/user-cache/package_repos/fncqgg4/repos/spack_repo/builtin/packages/py_pip/package.py:108, in setup_dependent_package:
        107    def setup_dependent_package(self, module, dependent_spec: Spec):
  >>    108        setattr(module, "pip", python.with_default_args("-m", "pip"))


==> Error: py-affine-2.1.0-qneewrxfasszzhektx5x2bp5u4ym5fjm: Package was not installed
==> Error: Installation request failed.  Refer to reported errors for failing package(s).

Information on your system

spack debug report
* **Spack:** 1.0.0.dev0 (f0adf2f52c75fd0e2fb164cfd7297d9a9eaf9f94)
* **Python:** 3.6.8
* **Platform:** linux-rhel8-sapphirerapids

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have searched the issues of this repo and believe this is not a duplicate
  • I have run the failing commands in debug mode and reported the output

Metadata

Metadata

Assignees

Labels

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions