나는 이것을 온라인에서 찾았지만 그들은 모두 내가 사용한 sudo 명령을 사용하도록 제안하고 있습니다.
sudo pip uninstall numpy
다음 메시지가 나타납니다.
Not uninstalling numpy at /usr/lib/python2.7/dist-packages, outside environment /usr
apt가 아닌 pip를 사용하여 설치했습니다.
출력 :
$ dpkg -S /usr/lib/python2.7/dist-packages/numpy
python-numpy: /usr/lib/python2.7/dist-packages/numpy
추신: 저는 Mac 사용자입니다. 저는 보통 설치에 홈브류를 사용합니다. 그래서 우분투에서는 아마추어입니다.
답변1
dpkg -S
의 출력에 따르면 다음을 실행하여 제거하여 numpy
설치되었습니다 .apt
sudo apt remove python-numpy
pip
다음을 사용하여 로컬에 설치할 수 있습니다 .
pip uninstall numpy --user
답변2
옵션을 사용하세요 --isolated
.
아래와 같이:
sudo pip uninstall numpy --isolated
답변3
위의 팁만이 도움이 되었습니다.
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) ...
그런 다음 사용자로 다시 설치하십시오.
pip3 install numpy
답변4
/usr/lib/python3/dist-packages
numpy와 관련된 두 디렉터리를 편집하고 수동으로 제거하여 문제를 해결했습니다 .
그 후 다음을 사용하여 패키지를 다시 설치했습니다.
pip install numpy