Ich habe gerade von 16.04 auf 17.10 aktualisiert und jedes Mal, wenn ich versuche, einen python2.7-Befehl auszuführen, erhalte ich den folgenden Fehler:
pip install --upgrade pip
Traceback (most recent call last):
File "/home/XXXX/bin/pip", line 7, in <module>
from pip import main
File "/home/XXXX/local/lib/python2.7/site-packages/pip/__init__.py",
line 5, in <module>
import logging
File "/usr/lib/python2.7/logging/__init__.py", line 26, in <module>
import sys, os, time, cStringIO, traceback, warnings, weakref,
collections
File "/home/XXXX/lib/python2.7/weakref.py", line 14, in <module>
from _weakref import (
ImportError: cannot import name _remove_dead_weakref
Ein anderer Benutzer hatte ein ähnliches Problem, das sich jedoch auf alle Python-Programme auswirkt, die ich auszuführen versuche. Ich kann nichts über Pip installieren oder Python-Skripte verwenden. Ich habe wirklich keine Ahnung, was ich tun soll, Hilfe wäre sehr dankbar.
Ausgabe von "python --version" ist
Python 2.7.12
"update python" erzeugt jedoch:
python is already the newest version (2.7.14-2ubuntu1).
ImportError: cannot import name _remove_dead_weakref
. Mein Python ist 2.7.14