Hi,
I installed python 3.11 on a raspberry pi 3B.
doing python -- version and python3.11 version shows Python 3.11.1
when I run sudo python3.11 myfile.py, I get an error that I could not solve, and on the internet I could only find solutions whereby people had set the pythonhome and pythonpath...but they are not set (see below)
Error :
Could not find platform independent libraries <prefix>
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = 'python3.11'
isolated = 0
environment = 1
user site = 1
safe_path = 0
import site = 1
is in build tree = 0
stdlib dir = '/usr/local/lib/python3.11'
sys._base_executable = '/usr/local/bin/python3.11'
sys.base_prefix = '/usr/local'
sys.base_exec_prefix = '/usr/local'
sys.platlibdir = 'lib'
sys.executable = '/usr/local/bin/python3.11'
sys.prefix = '/usr/local'
sys.exec_prefix = '/usr/local'
sys.path = [
'/usr/local/lib/python311.zip',
'/usr/local/lib/python3.11',
'/usr/local/lib/python3.11/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'
Any suggestions?
thank you in advance.
best regards
Ludo
I installed python 3.11 on a raspberry pi 3B.
doing python -- version and python3.11 version shows Python 3.11.1
when I run sudo python3.11 myfile.py, I get an error that I could not solve, and on the internet I could only find solutions whereby people had set the pythonhome and pythonpath...but they are not set (see below)
Error :
Could not find platform independent libraries <prefix>
Python path configuration:
PYTHONHOME = (not set)
PYTHONPATH = (not set)
program name = 'python3.11'
isolated = 0
environment = 1
user site = 1
safe_path = 0
import site = 1
is in build tree = 0
stdlib dir = '/usr/local/lib/python3.11'
sys._base_executable = '/usr/local/bin/python3.11'
sys.base_prefix = '/usr/local'
sys.base_exec_prefix = '/usr/local'
sys.platlibdir = 'lib'
sys.executable = '/usr/local/bin/python3.11'
sys.prefix = '/usr/local'
sys.exec_prefix = '/usr/local'
sys.path = [
'/usr/local/lib/python311.zip',
'/usr/local/lib/python3.11',
'/usr/local/lib/python3.11/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'
Any suggestions?
thank you in advance.
best regards
Ludo
Statistics: Posted by Patsjemoe — Fri Mar 01, 2024 10:38 am — Replies 1 — Views 38