简体   繁体   English

Pip3无法找到/安装模块

[英]Pip3 cannot find/install modules

I'm trying to install packages in Python using pip3. 我正在尝试使用pip3在Python中安装软件包。 I've definitely managed to install these packages on other systems, so I know they exist. 我确实设法在其他系统上安装了这些软件包,所以我知道它们存在。 But it's as if the pip3 repository I'm using doesn't contain then. 但是,好像我正在使用的pip3存储库中没有。 The packages are shelve and os. 软件包是货架和操作系统。 The error I get is along the lines of: 我得到的错误是:

    [root@host]# pip3 install shelve
Collecting shelve
  Could not find a version that satisfies the requirement shelve (from versions: )
No matching distribution found for shelve

I'm using RHEL 7 if that makes any difference. 如果这有任何区别,我正在使用RHEL 7。

The project has one release in 2011 and the release doesn't have downloadable files. 该项目在2011年发布了一个版本,并且该版本没有可下载的文件。 Not a useable project by all accounts. 不是所有帐户都可用的项目。

Do you mean shelve from the stdlib ? 您是说退出标准库吗? You don't need to install it, it's always available, just import it. 您无需安装它,它始终可用,只需导入即可。

you cal also use for example for install tkinter package : 您还可以使用例如安装tkinter软件包:

sudo apt-get install python-tk; if you have python installed

or you can use : 或者您可以使用:

sudo apt-get install python3-tk; if you have python3 installed

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

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