View Single Post
Old 07-29-2022, 10:16 PM   #3
xxyzz
Evangelist
xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.xxyzz ought to be getting tired of karma fortunes by now.
 
Posts: 442
Karma: 2666666
Join Date: Nov 2020
Device: none
But the same code runs fine on Fedora's python.

Code:
import subprocess

r = subprocess.run(["python3", "-m", "pip", "--version"], check=True, text=True, capture_output=True)
this would fail in calibre-debug,

`r.stderr`:
Code:
Could not find platform independent libraries <prefix>\n
Could not find platform dependent libraries <exec_prefix>\n
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]\n
Python path configuration:\n  
PYTHONHOME = (not set)\n  
PYTHONPATH = (not set)\n  
program name = 'python3'\n  
isolated = 0\n  
environment = 1\n  
user site = 1\n  
import site = 1\n 
sys._base_executable = '/usr/bin/python3'\n  
sys.base_prefix = '/tmp/t/python-n51y8gtd'\n  
sys.base_exec_prefix = '/tmp/t/python-n51y8gtd'\n  
sys.platlibdir = 'lib'\n  
sys.executable = '/usr/bin/python3'\n  
sys.prefix = '/tmp/t/python-n51y8gtd'\n  
sys.exec_prefix = '/tmp/t/python-n51y8gtd'\n  
sys.path = [\n
    '/tmp/t/python-n51y8gtd/lib/python310.zip',\n
    '/tmp/t/python-n51y8gtd/lib/python3.10',\n
    '/tmp/t/python-n51y8gtd/lib/lib-dynload',\n
]\n
Fatal Python error: init_fs_encoding: failed to get the Python codec of the filesystem encoding\n
Python runtime state: core initialized\n
ModuleNotFoundError: No module named 'encodings'\n\n

Current thread 0x00007f824f149740 (most recent call first):\n
<no Python frame>\n"

Last edited by xxyzz; 07-30-2022 at 03:23 AM.
xxyzz is offline   Reply With Quote