Can not find requests module in extension code

I created a new extension with template code , it works fine.
However when I try to import requests module , it display error, means can not find it .
However I can pip list requests model in my python script folder .
such as

The error code is just below :

import omni.ext
import omni.ui as ui
import omni.kit.commands
import json
import requests

I am really confused , if I changed my python interpreter to another like below image in VsCode , it will display can not find “OVE” related error

Find the solution .
The problem is OVE has its own requests model .
Just import omni.kit.pipapi instead of import requests
and before the http reqeust codes calll
result = omni.kit.pipapi.install(“requests==2.20.1”)
import requests
That works for me .

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.