I'm working through the Microsoft Python for beginners tutorial and I need some help with something

Hello,

I’m working through the Microsoft Python for beginners tutorial and I have a problem with lesson 35 Virtual environments packages. I followed all the instructions correctly and tried it several times.

I get the module not found error: no module named ‘pip_vendor.colorama’

Check the screenshot.

Any help would be appreciated.

Does that tutorial tell you to import that exact module? pip._vendor.colorama? If yes, it’s a terrible tutorial and honestly makes me question all other content in that series. That’s an internal implementation detail of pip, not something to be used publicly.

More likely it asked you to install colorama and you should be importing it via from colorama import init, Fore - notice that different module name.

Kind of. The tutor installs colorama to venv and then types from colorama import init, Fore but VS Code complains that colorama is not installed. He checks if he made a typo or something, starts typing colo... and VS Code offers pip._vendor.colorama completion, he accepts it (maybe without noticing).

Hm, yeah, then the tutor wasn’t paying attention, which is not good. (although that sequence of events is at least not the worst case I can imagine)

The correct module to import from is colorama; I don’t know what the setup in here is, but if it’s installed in the venv, you should be executing the script in this venv.

1 Like

Assuming that you are referring to this course : Python for Beginners | Microsoft Learn you should keep in mid that it is about 5 years ago since the videos were recorded.
The core concepts still remain the same, but VSCode and its python integration has changed substantially. For instance with activating the Python virtual environment.
I suspect that

  • the virtual environment was not activated when installing the colorama module
  • or the virtual environment is not selected in VSCode
1 Like

Thank you for all the replies everyone.