I want to install python3 (on a ubuntu system I got some days ago from an employee who is not longer in our company) via
apt install python 3
but it gives me an error:
Traceback (most recent call last):
File "/usr/lib/python3.6/py_compile.py", line 186, in <module>
sys.exit(main())
File "/usr/lib/python3.6/py_compile.py", line 178, in main
compile(filename, doraise=True)
File "/usr/lib/python3.6/py_compile.py", line 122, in compile
source_bytes = loader.get_data(file)
File "<frozen importlib._bootstrap_external>", line 832, in get_data
FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.6/__phello__.foo.py'
dpkg: Fehler beim Bearbeiten des Paketes python3.6 (--configure):
installed python3.6 package post-installation script subprocess returned error exit status 1
dpkg: Abhängigkeitsprobleme verhindern Konfiguration von python3:
python3 hängt ab von python3.6 (>= 3.6.7-1~); aber:
Paket python3.6 ist noch nicht konfiguriert.
dpkg: Fehler beim Bearbeiten des Paketes python3 (--configure):
Abhängigkeitsprobleme - verbleibt unkonfiguriert
Every "other" package (not related to python) can be installed and apt is working correctly. What could I do?
sudo apt-get install python3.6
? – singrium Mar 18 '21 at 12:28File "/usr/lib/python3.6/py_compile.py", line 186, in <module> sys.exit(main()) File "/usr/lib/python3.6/py_compile.py", line 178, in main compile(filename, doraise=True) File "/usr/lib/python3.6/py_compile.py", line 122, in compile source_bytes = loader.get_data(file) File "<frozen importlib._bootstrap_external>", line 832, in get_data FileNotFoundError: [Errno 2] No such file or directory: '/usr/lib/python3.6/__phello__.foo.py' dpkg:
– Coach83 Mar 18 '21 at 12:36/usr/lib/python3.6/__phello__.foo
is provided by packagelibpython3.6-stdlib
- perhaps you need to re-install it? – steeldriver Mar 18 '21 at 13:18apt
and had to download it withapt download libpython3.6-stdlib
and install it manually withdpkg -i libpython3.6-stdlib*
. THANK YOU! – Emad Jan 03 '23 at 07:09