Hello, I am having problems with command python. When I use command python it will do this:
Could not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
Fatal Python error: initfsencoding: Unable to get the locale encoding
ModuleNotFoundError: No module named 'encodings'
I can’t use python or its associated commands (pip, python). Where is problem and how to solve it?
When I want to install python (with apt install python) it will do this:
/var/lib/dpkg/info/python2.7.postinst: 9: /var/lib/dpkg/info/python2.7.postinst: /usr/bin/python2.7: not found
dpkg: error processing package python2.7 (--configure):
installed python2.7 package post-installation script subprocess returned error exit status 127
dpkg: dependency problems prevent configuration of python2:
python2 depends on python2.7 (>= 2.7.16-1~); however:
Package python2.7 is not configured yet.
dpkg: error processing package python2 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of python:
python depends on python2.7 (>= 2.7.16-1~); however:
Package python2.7 is not configured yet.
python depends on python2 (= 2.7.16-1); however:
Package python2 is not configured yet.
dpkg: error processing package python (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
python2.7
python2
python
E: Sub-process /usr/bin/dpkg returned an error code (1)