Alan
Alan

Reputation: 119

Installed module is not working (windows)

So long story short. I want to use requests and bs4 modules in my code. I installed them using pip install requests, pip install bs4. I double checked everything, even found installation folder and saw that the files is here, but my vs code is not detecting it and giving a error. I'm a quite new to this programming language so possibly it's a common issue. But i searched and mostly found posts about this problems on diffrent versions of linux, not windows.

Error i'm getting in vscode btw

Import "requests" could not be resolved from source

And when i'm launching the program through cmd the error is

ModuleNotFoundError: No module named 'requests'

Upvotes: 1

Views: 1747

Answers (1)

Sergi Novellas
Sergi Novellas

Reputation: 86

First, you should add more information for us to know how your computer and IDE are configured. The first thing you should do is to check that VS Code is using the Python version where you have pip installed the modules. That is, clicking at the bottom-left space as in the picture below. Then checking that the modules are within that path.

Otherwise, check out virtualenv. With this tool you can create virtual environments within your project's folder and makes it easier to manage packages.

Upvotes: 3

Related Questions