Omniverse Extension Python PiP lib won't load

I have python scripts in VS Code that is working with Nvidia Riva + A2F and i would like to convert that to a Omniverse Extension. The python program is already doing what i want it to do. So the extension is to provide the same functionality in Omniverse code as a extension.

Errors:

Python script 1:
Import "requests" could not be resolved from source

Python script 2:
Import "numpy" could not be resolved
Import "IPython.display" could not be resolved from source
Import "riva.client" could not be resolved
Import "scipy.io.wavfile" could not be resolved

toml file edit
I can verify that both names and random works in Omniverse Code.
But if i try to use numpy or requests it fails to install them.

[python.pipapi]
requirements = ["names", "random"]
use_online_index = true

Debugging:
Running: pip list
Reveals this:

Package                   Version
------------------------- --------------
annotated-types           0.6.0
anyio                     4.3.0
argon2-cffi               23.1.0        
argon2-cffi-bindings      21.2.0        
arrow                     1.3.0
asttokens                 2.4.1
async-lru                 2.0.4
attrs                     23.2.0        
Babel                     2.14.0        
beautifulsoup4            4.12.3        
bidict                    0.23.1        
bleach                    6.1.0
blinker                   1.7.0
certifi                   2024.2.2      
cffi                      1.16.0        
charset-normalizer        2.0.12        
click                     8.1.7
colorama                  0.4.6
comm                      0.2.1
cuda-python               11.8.3        
debugpy                   1.8.1
decorator                 5.1.1
defusedxml                0.7.1
distlib                   0.3.8
distro                    1.9.0
docker                    7.0.0
executing                 2.0.1
fastjsonschema            2.19.1
filelock                  3.13.1
Flask                     2.1.2
Flask-Cors                3.0.10
Flask-SocketIO            4.2.1
fqdn                      1.5.1
grpcio                    1.60.1
grpcio-tools              1.60.1
h11                       0.14.0
httpcore                  1.0.4
httpx                     0.27.0
idna                      3.6
importlib_metadata        7.0.2
inflect                   3.0.2
install                   1.3.5
ipykernel                 6.29.2
ipython                   8.21.0
isoduration               20.11.0
itsdangerous              2.1.2
jedi                      0.19.1
Jinja2                    3.1.3
json5                     0.9.24
jsonpointer               2.4
jsonschema                4.21.1
jsonschema-specifications 2023.12.1
jupyter_client            8.6.0
jupyter_core              5.7.1
jupyter-events            0.10.0
jupyter-lsp               2.2.4
jupyter_server            2.13.0
jupyter_server_terminals  0.5.3
jupyterlab                4.1.5
jupyterlab_pygments       0.3.0
jupyterlab_server         2.25.4
keyboard                  0.13.5
MarkupSafe                2.1.5
matplotlib-inline         0.1.6
mistune                   3.0.2
nbclient                  0.10.0
nbconvert                 7.16.3
nbformat                  5.10.3
nest-asyncio              1.6.0
notebook                  7.1.2
notebook_shim             0.2.4
numpy                     1.26.4
nvidia-pyindex            1.0.9
nvidia-riva-client        2.14.0
openai                    1.14.2
overrides                 7.7.0
packaging                 23.2
pandocfilters             1.5.1
parso                     0.8.3
pip                       24.0
platformdirs              4.2.0
prometheus_client         0.20.0
prompt-toolkit            3.0.43
protobuf                  4.25.3
psutil                    5.9.8
pure-eval                 0.2.2
pyarrow                   15.0.0
PyAudio                   0.2.14
pycparser                 2.21
pydantic                  2.6.4
pydantic_core             2.16.3
Pygments                  2.17.2
pylance                   0.10.5
python-dateutil           2.8.2
python-engineio           4.9.0
python-json-logger        2.0.7
python-socketio           5.11.1
pywin32                   306
pywinpty                  2.0.13
PyYAML                    6.0.1
pyzmq                     25.1.2
referencing               0.34.0
requests                  2.31.0
rfc3339-validator         0.1.4
rfc3986-validator         0.1.1
rpds-py                   0.18.0
scipy                     1.12.0
Send2Trash                1.8.2
setuptools                69.1.0
simple-websocket          1.0.0
six                       1.16.0
sniffio                   1.3.1
soundfile                 0.12.1
soupsieve                 2.5
stack-data                0.6.3
terminado                 0.18.1
tinycss2                  1.2.1
tornado                   6.4
tqdm                      4.66.2
traitlets                 5.14.1
types-python-dateutil     2.9.0.20240316
typing_extensions         4.10.0
uri-template              1.3.0
urllib3                   1.26.18
virtualenv                20.25.1
wcwidth                   0.2.13
webcolors                 1.13
webencodings              0.5.1
websocket-client          1.7.0
Werkzeug                  2.0.3
wheel                     0.42.0
wsproto                   1.2.0
zipp                      3.17.0

This is an example of how i install requests in the .py file

import omni.kit.pipapi

omni.kit.pipapi.install("requests")

Edit
I can verify that requests module is working
I get a respone 200 here. Which is the same as the example

def ui_typequestion():
                    x = requests.get('https://w3schools.com')
                    label.text = f"{x.status_code}"

example

I can verify that the scipy.io.wavfile is working
image

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