简体   繁体   English

无法安装模块“os”和“os.path”

[英]Can't install modules 'os' and 'os.path'

I am trying to install 'os' module and 'os.path' module on a red hat machine.我正在尝试在红帽机器上安装“os”模块和“os.path”模块。 I tries following commands.我尝试以下命令。

pip install os
yum install os

But I keep gettin the following error但我不断出现以下错误

Could not find a version that satisfies the requirement os.path (from versions: )
No matching distribution found for os.path

I am able to install other modules using aforementioned command but not able to install these.我可以使用上述命令安装其他模块,但无法安装这些。

I need to install both os and os.path.我需要安装 os 和 os.path。

Using version python 3.4.3使用版本 python 3.4.3

Take a look into this extensive list of Python Library 3.4 .看看这个广泛的Python 库 3.4列表。 If it's mentioned there that means it's already included in the original installation of Python.如果在那里提到它,则意味着它已经包含在 Python 的原始安装中。 More specifically os.path更具体地说os.path

The reason you're getting this specific error because you're trying to install something that doesn't exist.您收到此特定错误的原因是因为您正在尝试安装不存在的东西。 The hint for that is os.path (from versions: ) meaning there isn't an external package that matches "os.path" or any proper version of it.对此的提示是os.path (来自版本:)意味着没有匹配“os.path”或其任何适当版本的外部包。

Try this command.试试这个命令。 It worked in my system.它在我的系统中工作。

pip install path.py

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

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