Reputation: 320
I'm trying to install the os
Python module on Windows.
In a cmd
console, I typed:
C:\Users\username> pip install os
Collecting os
Could not find a version that satisfies the requirement os (from versions: )
No matching distribution found for os
So I guessed the module was not available on Windows for some reasons, but I found references of it in some SO questions.
Obviously, typing Windows
and os
in Google only gives me answers about Windows itself.
So, how can I install the os
module on Windows?
Determining if a given Python module is a built-in module - to learn how to check if a library is built-in and hence doesn't require installing.
Upvotes: 12
Views: 225703
Reputation: 11
The Following Line can be pasted in cmd or any terminal to install the module.
pip install os-sys
Upvotes: -11
Reputation: 2337
If you are trying to use the os
library in your Python code and you are getting an error like NameError: name 'os' is not defined
, you need to make sure you are including an import statement near the top of your Python script to use the os library:
import os
Upvotes: 4
Reputation: 462
OS is python's standard library. So no need to download it.
Upvotes: 41