Discussion:
Issue bootstrapping Python - troubleshooting steps?
(too old to reply)
Piper McCorkle
2024-08-06 01:49:07 UTC
Permalink
Hi!

I'm working on a Linux From Scratch sort of system, and part of that is bootstrapping Python. I'm running into an error message in the compilation though - could anyone help me with next steps on troubleshooting the error?
./_bootstrap_python /tmp/sources/Python-3.12.4/Programs/_freeze_module.py abc /tmp/sources/Python-3.12.4/Lib/abc.py Python/frozen_modules/abc.h
Fatal Python error: init_import_site: Failed to import the site module
Python runtime state: initialized
File "/tmp/sources/Python-3.12.4/Lib/site.py", line 80, in <module>
PREFIXES = [sys.prefix, sys.exec_prefix]
^^^^^^^^^^
AttributeError: module 'sys' has no attribute 'prefix'
make[2]: *** [Makefile:1329: Python/frozen_modules/abc.h] Error 1
I'm essentially trying to build Python with the following commands:
$ cd /tmp/build/Python
$ /tmp/sources/Python-3.12.4/configure --enable-shared --with-system-expat --enable-optimizations --prefix=
$ make
$ make install

I'm building Python 3.12.4.
$ sha256sum sources/Python-3.12.4.tar.xz
f6d419a6d8743ab26700801b4908d26d97e8b986e14f95de31b32de2b0e79554 sources/Python-3.12.4.tar.xz

I've attached a complete build log. If you need any more information in order to help me, please feel free to ask! I'd appreciate if you can CC me on any replies, so that they end up in my inbox instead of in the mailing list digest.

Piper McCorkle (https://piperswe.me)
***@piperswe.me | +1 (508) 493-8615
Barry Scott
2024-08-06 20:09:41 UTC
Permalink
Post by Piper McCorkle
$ /tmp/sources/Python-3.12.4/configure --enable-shared --with-system-expat --enable-optimizations --prefix=
I assume that you must provide a value for --prefix. The linux default would be --prefix=/usr

Barry

Loading...