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
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 .
os is a standard Python module, there's no need install it.
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.
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.
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.
Try this command. It worked in my system.
pip install path.py
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With