Ich habe das online nachgeschlagen, aber alle empfehlen die Verwendung des sudo-Befehls, den ich verwendet habe
sudo pip uninstall numpy
Ich erhalte diese Meldung:
Not uninstalling numpy at /usr/lib/python2.7/dist-packages, outside environment /usr
Ich habe es mit pip installiert, nicht mit apt.
Die Ausgabe von:
$ dpkg -S /usr/lib/python2.7/dist-packages/numpy
python-numpy: /usr/lib/python2.7/dist-packages/numpy
PS: Ich bin ein Mac-Benutzer und verwende normalerweise Homebrew für meine Installationen. Ich bin also ein Amateur in Ubuntu
Antwort1
Laut der Ausgabe von dpkg -S
wurde numpy
es mit installiert apt
. Um es zu entfernen, führen Sie Folgendes aus:
sudo apt remove python-numpy
Sie verfügen möglicherweise über eine lokale Installation davon mit . pip
Um diese zu entfernen, können Sie Folgendes verwenden:
pip uninstall numpy --user
Antwort2
Option verwenden --isolated
.
Wie unten:
sudo pip uninstall numpy --isolated
Antwort3
Nur dieser obige Tipp hat geholfen:
sudo apt remove python3-numpy
->
The following packages were automatically installed and are no longer required:
libjs-jquery-ui python-matplotlib-data python3-kiwisolver
Use 'sudo apt autoremove' to remove them.
The following packages will be REMOVED:
python3-matplotlib python3-numpy
0 upgraded, 0 newly installed, 2 to remove and 1 not upgraded.
After this operation, 28.3 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 389330 files and directories currently installed.)
Removing python3-matplotlib (3.1.2-1ubuntu4) ...
Removing python3-numpy (1:1.17.4-5ubuntu3) ...
und anschließend als Benutzer neu installieren:
pip3 install numpy
Antwort4
Ich habe das Problem gelöst, indem ich /usr/lib/python3/dist-packages
die beiden mit Numpy verknüpften Verzeichnisse bearbeitet und manuell entfernt habe.
Danach habe ich die Pakete neu installiert mit
pip install numpy