Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

Error when installing Python 3.12.2 with SSL module in CentOS 7

$
0
0

I've been trying to install Python 3.12.2 with the SSL module in CentOS v7.9.2009 but I'm getting an error at the end.I have followed these steps but I always get the same error at the end:

[root@server Python-3.12.2]# make altinstall./_bootstrap_python ./Programs/_freeze_module.py abc ./Lib/abc.py Python/frozen_modules/abc.hFatal Python error: init_import_site: Failed to import the site modulePython runtime state: initializedTraceback (most recent call last):  File "/usr/src/Python-3.12.2/Lib/site.py", line 73, in <module>    import os  File "/usr/src/Python-3.12.2/Lib/os.py", line 29, in <module>    from _collections_abc import _check_methodsSystemError: <built-in function compile> returned NULL without setting an exceptionmake: *** [Python/frozen_modules/abc.h] Error 1

I also get a failure in "test_embed" before that:

0:00:22 load avg: 0.95 [16/44] test_embedtest test_embed failed0:00:30 load avg: 0.95 [17/44] test_float -- test_embed failed (2 errors)

Then, when I run Python I get the following output:

[root@server Python-3.12.2]# python3.12Could not find platform independent libraries <prefix>Could not find platform dependent libraries <exec_prefix>Python path configuration:  PYTHONHOME = (not set)  PYTHONPATH = (not set)  program name = 'python3.12'  isolated = 0  environment = 1  user site = 1  safe_path = 0  import site = 1  is in build tree = 0  stdlib dir = '/usr/local/lib/python3.12'  sys._base_executable = '/usr/local/bin/python3.12'  sys.base_prefix = '/usr/local'  sys.base_exec_prefix = '/usr/local'  sys.platlibdir = 'lib'  sys.executable = '/usr/local/bin/python3.12'  sys.prefix = '/usr/local'  sys.exec_prefix = '/usr/local'  sys.path = ['/usr/local/lib/python312.zip','/usr/local/lib/python3.12','/usr/local/lib/python3.12/lib-dynload',  ]Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encodingPython runtime state: core initializedModuleNotFoundError: No module named 'encodings'Current thread 0x00007fb3369f7740 (most recent call first):<no Python frame>

When I don't use SSL Python is installed without any problem.

Following this other answer it installs just fine but I'd like to have the latest version as my project was made in the 3.12.2 version.

What should I do to fix this?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>