Skip to content

Installation issue: python #37171

@awadell1

Description

@awadell1

Steps to reproduce the issue

$ spack spec -I [email protected]+zlib
Input spec
--------------------------------
 -   [email protected]+zlib

Concretized
--------------------------------
[+]  [email protected]%[email protected]+bz2+crypt+ctypes+dbm~debug+libxml2+lzma~nis~optimizations+pic+pyexpat+pythoncmd+readline
+shared+sqlite3+ssl~tkinter+uuid+zlib build_system=generic patches=0d98e93,7d40923,f2fd060 arch=linux-opensuse15-zen
[+]      ^[email protected]%[email protected]~debug~pic+shared build_system=generic arch=linux-opensuse15-zen
[+]          ^[email protected]%[email protected] build_system=autotools arch=linux-opensuse15-zen
[+]      ^[email protected]%[email protected]+libbsd build_system=autotools arch=linux-opensuse15-zen
[+]          ^[email protected]%[email protected] build_system=autotools arch=linux-opensuse15-zen
[+]              ^[email protected]%[email protected] build_system=autotools arch=linux-opensuse15-zen
[+]      ^[email protected]%[email protected] build_system=autotools arch=linux-opensuse15-zen
[+]      ^[email protected]%[email protected]+bzip2+curses+git~libunistring+libxml2+tar+xz build_system=autotools arch=linux-open
suse15-zen
[+]          ^[email protected]%[email protected] build_system=autotools libs=shared,static arch=linux-opensuse15-zen
[+]          ^[email protected]%[email protected]~python build_system=autotools arch=linux-opensuse15-zen
[+]          ^[email protected]%[email protected] build_system=autotools zip=pigz arch=linux-opensuse15-zen
[+]              ^[email protected]%[email protected] build_system=makefile arch=linux-opensuse15-zen
[+]              ^[email protected]%[email protected]+programs build_system=makefile compression=none libs=shared,static arch=linux-o
pensuse15-zen
[+]      ^[email protected]%[email protected] build_system=autotools arch=linux-opensuse15-zen
[+]      ^[email protected]%[email protected]~obsolete_api build_system=autotools arch=linux-opensuse15-zen
[+]          ^[email protected]%[email protected]+cpanm+open+shared+threads build_system=generic arch=linux-opensuse15-zen
[+]              ^[email protected]%[email protected]+cxx~docs+stl build_system=autotools patches=26090f4,b231fcc arch=linux
-opensuse15-zen
[+]      ^[email protected]%[email protected]~symlinks+termlib abi=none build_system=autotools arch=linux-opensuse15-zen
[+]      ^[email protected]%[email protected]~docs~shared build_system=generic certs=mozilla arch=linux-opensuse15-zen
[+]          ^ca-certificates-mozilla@2023-01-10%[email protected] build_system=generic arch=linux-opensuse15-zen
[+]      ^[email protected]%[email protected] build_system=autotools arch=linux-opensuse15-zen
[+]      ^[email protected]%[email protected] build_system=autotools patches=bbf97f1 arch=linux-opensuse15-zen
[+]      ^[email protected]%[email protected]+column_metadata+dynamic_extensions+fts~functions+rtree build_system=autotools arch=l
inux-opensuse15-zen
[+]      ^[email protected]%[email protected] build_system=autotools arch=linux-opensuse15-zen
[+]      ^[email protected]%[email protected]~pic build_system=autotools libs=shared,static arch=linux-opensuse15-zen
[+]      ^[email protected]%[email protected]+optimize+pic+shared build_system=makefile arch=linux-opensuse15-zen

$ spack install --overwrite -y [email protected]

Error message

Instance of python installed by spack cannot import the zlib module

Error message
```console
❯ spack load [email protected]

❯ which python3
/home/awadell/spack/opt/spack/linux-opensuse15-zen/gcc-7.5.0/python-3.10.10-xplxbc5o5jrloglj35wngefohj7tt6ze/bin/python3

❯ python3 -c "import zlib"
Could not find platform dependent libraries 
Consider setting $PYTHONHOME to [:]
Traceback (most recent call last):
  File "", line 1, in 
ModuleNotFoundError: No module named 'zlib'

❯ PYTHONHOME=~/spack/opt/spack/linux-opensuse15-zen/gcc-7.5.0/python-3.10.10-xplxbc5o5jrloglj35wngefohj7tt6ze/ python3 -c "import zlib"
Traceback (most recent call last):
  File "", line 1, in 
ModuleNotFoundError: No module named 'zlib'
```

Information on your system

❯ spack debug report

  • Spack: 0.20.0.dev0 (c76023d)
  • Python: 3.6.13
  • Platform: linux-opensuse15-zen3
  • Concretizer: clingo

Additional information

spack-build-out.txt
spack-build-env.txt
spack-configure-args.txt
spack-build-01-configure-out.txt

@adamjstewart @pradyunsg @scheibelp @skosukhin

Staged Version works

Installing with spack and keeping the stage, results in a usable instance, but the installed version lack's zlib:

spack install --overwrite --keep-stage [email protected]+zlib
...spack cd [email protected]+zlib./python
Python 3.10.10 (main, Apr 24 2023, 19:39:34) [GCC 7.5.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import zlib
>>> 

General information

  • I have run spack debug report and reported the version of Spack/Python/Platform
  • I have run spack maintainers <name-of-the-package> and @mentioned any maintainers
  • I have uploaded the build log and environment files
  • I have searched the issues of this repo and believe this is not a duplicate

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions