Search code examples
pythonvirtualenvpython-venv

How to Install Standard Libraries in Python Virtual Environment


When I work on a Python Virtual Environment ($ python -m venv myenv), I couldn't find the os module in it.

I tried $ pip install os, but couldn't find the package there as well. How do I go about installing modules from the standard library?

Thanks for the help.


Solution

  • Are you able to import the module? If not, it sounds like your Python installation is broken. The standard library has its name because it is always included in a vanilla Python installation.