简体   繁体   English

删除linux中numpy的所有迭代

[英]Deleting all iterations of numpy in linux

I need some help.我需要一些帮助。 I am using Linux on my Raspberry Pi.我在我的树莓派上使用 Linux。 I am creating a python program that requires many libraries, and one of them is numpy.我正在创建一个需要许多库的 python 程序,其中一个是 numpy。 It has recently come to my attention that my Pi has many versions of numpy on it, which is not what I want.最近我注意到我的 Pi 上有很多版本的 numpy,这不是我想要的。 I've tried to use the simple我试过用简单的

pip uninstall numpy

command in the terminal, but it's only uninstalling one of the many instances of numpy on my computer.终端中的命令,但它只是卸载我计算机上众多 numpy 实例之一。 Here's how I found out I had a problem:以下是我发现我遇到问题的方法:

I made a python program called libcheck.py that said:我制作了一个名为 libcheck.py 的 python 程序,它说:

import numpy
print(numpy.__version__)

and it put out:它推出了:

1.19.5

This is not the most recent version, so I ran:这不是最新版本,所以我跑了:

pip uninstall numpy
pip install numpy

and it said that 1.23.1 was successfully installed.它说 1.23.1 安装成功。 However, when I ran libcheck.py again, it put out:但是,当我再次运行 libcheck.py 时,它显示:

1.19.5

This led me to use the search tool on my Pi to find all places where numpy is present.这导致我使用我的 Pi 上的搜索工具来查找所有存在 numpy 的地方。 I found there were 4. I really want to fully uninstall numpy from my computer so I can install the newest version.我发现有 4 个。我真的很想从我的计算机上完全卸载 numpy,这样我就可以安装最新版本。 Here's my question: what would be the command that would fully uninstall numpy?这是我的问题:完全卸载 numpy 的命令是什么? I'm afraid that manually deleting those folders will do something weird to my computer.恐怕手动删除这些文件夹会对我的计算机造成奇怪的影响。

Thank you, Margorp13谢谢你,Margorp13

It is probably using cached numpy downloaded earlier.它可能正在使用之前下载的缓存 numpy。 The version can be specified when installing as:安装时可以指定版本为:

pip install numpy==1.23.1

or instruct pip to not use cache directory或指示 pip 不使用缓存目录

pip install numpy --no-cache-dir

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM