[New-bugs-announce] [issue42657] Python 3.9.1 building process could not use local standard library

xz_sophos report at bugs.python.org
Wed Dec 16 05:47:58 EST 2020


New submission from xz_sophos <xing.zhang at sophos.com>:

When trying to build python 3.9.1 on Mac OSX 10.15, one of the building step by make is to run this command: 

DYLD_FRAMEWORK_PATH=/Users/jenkins/BaseFolder/savmac-python ./python.exe -E -S -m sysconfig --generate-posix-vars ;\
 	if test $? -ne 0 ; then \
 		echo "generate-posix-vars failed" ; \
 		rm -f ./pybuilddir.txt ; \
 		exit 1 ; \
 	fi

It would produce this error message: 

Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Python path configuration:
  PYTHONHOME = (not set)
  PYTHONPATH = (not set)
  program name = '/Library/Frameworks/Python.framework/Versions/3.7/bin/python3'
  isolated = 0
  environment = 0
  user site = 1
  import site = 0
  sys._base_executable = '/Library/Frameworks/Python.framework/Versions/3.7/bin/python3'
  sys.base_prefix = '/Users/jenkins/BaseFolder/savmac-python/sophos/tmp/Python.framework/Versions/3.9'
  sys.base_exec_prefix = '/Users/jenkins/BaseFolder/savmac-python/sophos/tmp/Python.framework/Versions/3.9'
  sys.platlibdir = 'lib'
  sys.executable = '/Library/Frameworks/Python.framework/Versions/3.7/bin/python3'
  sys.prefix = '/Users/jenkins/BaseFolder/savmac-python/sophos/tmp/Python.framework/Versions/3.9'
  sys.exec_prefix = '/Users/jenkins/BaseFolder/savmac-python/sophos/tmp/Python.framework/Versions/3.9'
  sys.path = [
    '/Users/jenkins/BaseFolder/savmac-python/sophos/tmp/Python.framework/Versions/3.9/lib/python39.zip',
    '/Users/jenkins/BaseFolder/savmac-python/sophos/tmp/Python.framework/Versions/3.9/lib/python3.9',
    '/Users/jenkins/BaseFolder/savmac-python/sophos/tmp/Python.framework/Versions/3.9/lib/lib-dynload',
  ]
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding
Python runtime state: core initialized
ModuleNotFoundError: No module named 'encodings'

Current thread 0x000000011668ddc0 (most recent call first):
<no Python frame>
15:08:54 stdout: generate-posix-vars failed
make: *** [pybuilddir.txt] Error 1


Please note that current working directory is : /Users/jenkins/BaseFolder/savmac-python

In the Mac, there is already a python 3.7 installed at: /Library/Frameworks/Python.framework/Versions/3.7/bin/python3

I wonder what's the root cause of the above ./python.exe error, as I don't have this error on a different MacOS 10.15 with an existing installation of "python launcher.app" (version 3.9.1)

----------
components: macOS
messages: 383144
nosy: ned.deily, ronaldoussoren, xz_sophos
priority: normal
severity: normal
status: open
title: Python 3.9.1 building process could not use local standard library
type: compile error
versions: Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue42657>
_______________________________________


More information about the New-bugs-announce mailing list