So this question is pretty easy, but I didn't find a great answer. In my program, I want to import the OS package using: import os
.
Well, how can I import this package using the anaconda prompt? I tried conda install os
and pip install os
and it didn't work. Can anyone help me?
Asked
Active
Viewed 3.1k times
2

Luan Souza
- 159
- 1
- 1
- 11
-
1What happened when you tried `import os`? – Fynn Becker Jan 24 '19 at 21:36
-
I'm using a server to run my code (serv of another place, greater than mine) and when I try to execute "conda install os" this returns an error. The error is too long for a comment. Do you really want to see it? – Luan Souza Jan 24 '19 at 21:41
-
I saw that "os" is a standard package in python3. That's true? – Luan Souza Jan 24 '19 at 21:43
-
Yes, hence my question. Unless you have something really weird going on there you shouldn't need to install it. – Fynn Becker Jan 24 '19 at 21:44
-
Ok, thank you for your answers!!! – Luan Souza Jan 24 '19 at 21:46
-
The "random" package belongs to that same situation? – Luan Souza Jan 24 '19 at 21:47
-
The standard library is well documented [here](https://docs.python.org/3/library/). – Fynn Becker Jan 24 '19 at 21:50
1 Answers
5
os
is already installed with your python package. You just have to import it into your python files, you can do this by import os
.

Vaibhav
- 484
- 4
- 7