Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can't install modules 'os' and 'os.path'

I am trying to install 'os' module and 'os.path' module on a red hat machine. 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.

Using version python 3.4.3

like image 529
user3664020 Avatar asked Jul 10 '15 20:07

user3664020


People also ask

What is OS and OS path?

The os. path module is a very extensively used module that is handy when processing files from different places in the system. It is used for different purposes such as for merging, normalizing and retrieving path names in python .

How do I install an OS module in Python 3?

os is a standard Python module, there's no need install it.

Is OS path a module?

The os.path module is always the path module suitable for the operating system Python is running on, and therefore usable for local paths. However, you can also import and use the individual modules if you want to manipulate a path that is always in one of the different formats.

Why can't Python find my module?

This is caused by the fact that the version of Python you're running your script with is not configured to search for modules where you've installed them. This happens when you use the wrong installation of pip to install packages.


2 Answers

Take a look into this extensive list of Python Library 3.4. If it's mentioned there that means it's already included in the original installation of Python. More specifically 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.

like image 146
Leb Avatar answered Oct 24 '22 12:10

Leb


Try this command. It worked in my system.

pip install path.py
like image 45
Pooja Khatri Avatar answered Oct 24 '22 10:10

Pooja Khatri