I am trying to run a private project code on my local computer and when I do poetry install command it shows below error.
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 = '/Users/tok/Library/Application Support/pypoetry/venv/bin/python'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/Users/tok/Library/Application Support/pypoetry/venv/bin/python'
sys.base_prefix = '/Users/tok/anaconda3'
sys.base_exec_prefix = '/Users/tok/anaconda3'
sys.platlibdir = 'lib'
sys.executable = '/Users/tok/Library/Application Support/pypoetry/venv/bin/python'
sys.prefix = '/Users/tok/anaconda3'
sys.exec_prefix = '/Users/tok/anaconda3'
sys.path = [
'/Users/tok/anaconda3/lib/python39.zip',
'/Users/tok/anaconda3/lib/python3.9',
'/Users/tok/anaconda3/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 0x00007ff84884a640 (most recent call first):
<no Python frame>
I thought this relates to anaconda3 and I uninstall anaconda3. However it is still showing the same error message. I am on python3.9 environment and very new to poetry. Any suggestions are highly appreciated!
Update: I tried setting PYTHONHOME and PYTHONPATH but still getting below errors now. I tried creating venv for this specific project, uninstall and reinstall python but still the same errors...
Python path configuration:
PYTHONHOME = '/Users/tok/anaconda3'
PYTHONPATH = '/Users/tok/anaconda3/bin'
program name = '/Users/tok/Library/Application Support/pypoetry/venv/bin/python'
isolated = 0
environment = 1
user site = 1
import site = 1
sys._base_executable = '/Users/tok/Library/Application Support/pypoetry/venv/bin/python'
sys.base_prefix = '/Users/tok/anaconda3'
sys.base_exec_prefix = '/Users/tok/anaconda3'
sys.platlibdir = 'lib'
sys.executable = '/Users/tok/Library/Application Support/pypoetry/venv/bin/python'
sys.prefix = '/Users/tok/anaconda3'
sys.exec_prefix = '/Users/tok/anaconda3'
sys.path = [
'/Users/tok/anaconda3/bin',
'/Users/tok/anaconda3/lib/python39.zip',
'/Users/tok/anaconda3/lib/python3.9',
'/Users/tok/anaconda3/lib/python3.9/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 0x00007ff8596ec640 (most recent call first):
<no Python frame>