Problem upgrading - broken Python installation
Posted: Sat Mar 02, 2019 2:42 pm
Hi everyone,
I have this weird problem when upgrading/installing any packages on one of my Pis:
It seems that this is not a dpkg problem, but that for some reason the Python 2.7 installation is shot, as even the interactive interpreter complains about invalid syntax after entering only this line (which works on the same machine in Python 3):
Any ideas how to fix this without reinstalling the whole thing?
Thanks!
I have this weird problem when upgrading/installing any packages on one of my Pis:
Code: Select all
dpkg: trying script from the new package instead ...
File "/usr/bin/pyclean", line 82
if options.verbose or environ.get('PYCLEAN_DEBUG') == '1':
^
SyntaxError: invalid syntax
dpkg: error processing archive /var/cache/apt/archives/python-ldb_2%3a1.1.27-1+deb9u1_armhf.deb (--unpack):
subprocess new pre-removal script returned error exit status 1
File "/usr/bin/pycompile", line 212
if options.verbose or environ.get('PYCOMPILE_DEBUG') == '1':
^
SyntaxError: invalid syntax
Code: Select all
if a or b:
Thanks!