Home > Net >  Python can't find installed module
Python can't find installed module

Time:10-03

I successfully installed the module geocoder:

Requirement already satisfied: chardet<5,>=3.0.2 in c:\users\myname\appdata\roaming\python\python39\site-packages (from requests->geocoder) (4.0.0) Installing collected packages: ratelim, geocoder Successfully installed geocoder-1.38.1 ratelim-0.1.6

When I try to create a Python file that includes import geocoder, I get the error Import "geocoder" could not be resolved.

The relevant path is included in sys.path:

C:\Users\myname\Downloads C:\Users\myname\AppData\Local\Programs\Python\Python39\python39.zip C:\Users\myname\AppData\Local\Programs\Python\Python39\DLLs C:\Users\myname\AppData\Local\Programs\Python\Python39\lib C:\Users\myname\AppData\Local\Programs\Python\Python39 C:\Users\myname\AppData\Roaming\Python\Python39\site-packages C:\Users\myname\AppData\Roaming\Python\Python39\site-packages\win32 C:\Users\myname\AppData\Roaming\Python\Python39\site-packages\win32\lib C:\Users\myname\AppData\Roaming\Python\Python39\site-packages\Pythonwin C:\Users\myname\AppData\Local\Programs\Python\Python39\lib\site-packages C:\Users\myname\AppData\Local\Programs\Python\Python39\lib\site-packages\win32 C:\Users\myname\AppData\Local\Programs\Python\Python39\lib\site-packages\win32\lib C:\Users\myname\AppData\Local\Programs\Python\Python39\lib\site-packages\Pythonwin

Why isn't Python able to resolve this module?

Thanks

CodePudding user response:

Either geocoder is installed to other than Python3.9 version installation (e.g. python 3.7) or geocoder is not in the path of your python module.

Try to install the library using specific Python pip package manager (e.g. pip3.9) and run the module you develop using specific Python version (e.g. Python3.9)

  • Related