How to fix “ImportError: No module named …” error in Python?

How to fix “ImportError: No module named …” error in Python?

1. Find the python installation location using the command where python in the command prompt. 

2. Navigate to the Scripts folder under the python installation folder

3. Use the below command 

pip install <module name>

For example, if I get an error that module Requests is missing, the command will be

pip install requests

Post success message. Go to <python directory>\Lib\site-packages and ensure that the installed package is created as a folder.



If module error comes even after installing the module, Check if any multiple python versions are installed in the server 

If multiple python versions are installed uninstall any one version and follow the same steps from starting.

                  New to ADSelfService Plus?