Python not working with conda due to a PYTHONHOME AND PYTHONPATH being sent

When you set PYTHONPATH and PAYTHONHOME to these weird directories in order to get them to work again you have to UNSET PYTHONPATH and PYTHONHOME…

conda
Python path configuration:
PYTHONHOME = ‘/tmp/.mount_cursord9RrlF/usr/’
PYTHONPATH = ‘/tmp/.mount_cursord9RrlF/usr/share/pyshared/:’
program name = ‘/home/dave/miniconda3/bin/python’
isolated = 0
environment = 1
user site = 1
safe_path = 0
import site = 1
is in build tree = 0
stdlib dir = ‘/tmp/.mount_cursord9RrlF/usr/lib/python3.12’
sys._base_executable = ‘/home/dave/miniconda3/bin/python’
sys.base_prefix = ‘/tmp/.mount_cursord9RrlF/usr/’
sys.base_exec_prefix = ‘/tmp/.mount_cursord9RrlF/usr/’
sys.platlibdir = ‘lib’
sys.executable = ‘/home/dave/miniconda3/bin/python’
sys.prefix = ‘/tmp/.mount_cursord9RrlF/usr/’
sys.exec_prefix = ‘/tmp/.mount_cursord9RrlF/usr/’
sys.path = [
‘/tmp/.mount_cursord9RrlF/usr/share/pyshared’,
‘/home/dave/Desktop/mltrading’,
‘/tmp/.mount_cursord9RrlF/usr/lib/python312.zip’,
‘/tmp/.mount_cursord9RrlF/usr/lib/python3.12’,
‘/tmp/.mount_cursord9RrlF/usr/lib/python3.12/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 0x0000751cff787740 (most recent call first):

dave@dave:~/Desktop/mltrading$ unset PYTHONHOME PYTHONPATH
dave@dave:~/Desktop/mltrading$ conda
usage: conda [-h] [-v] [–no-plugins] [-V] COMMAND …

conda is a tool for managing and deploying applications, environments and packages.

options:
-h, --help Show this help message and exit.
-v, --verbose Can be used multiple times. Once for detailed output, twice for INFO logging, thrice for DEBUG logging, four times for TRACE logging.
–no-plugins Disable all plugins that are not built into conda.
-V, --version Show the conda version number and exit.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.