Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.
This repository was archived by the owner on May 29, 2026. It is now read-only.

🐛[BUG]: Import error: No module named 'physicsnemo.sym' after pip install the module #282

Closed

Description

@ShawnLiaoyx

Version

2.3.0

On which installation method(s) does this occur?

Pip

Describe the issue

Tried to run some examples under physicsnemo/examples/cfd/swe_nonlinear_pino that imports physicsnemo.sym. Program reported "Import error: No module named 'physicsnemo.sym'" even after installing the sym module.

The whole process:

  1. git clone physicsnemo
  2. under the root folder: uv sync
  3. also under the root folder:
uv pip install torch torchvision
uv pip install Cython
uv pip install nvidia-physicsnemo-sym --no-build-isolation
  1. installtion succeeded. uv pip show nvidia-physicsnemo-sym reports version number normally
  2. run an example: uv run python examples/cfd/swe_nonlinear_pino/train_swe_nl_pino.py. Program aborted with following message:
Warp DeprecationWarning: The namespace `warp.context` will soon be removed from the public API. It can still be accessed from `warp._src.context` but might be changed or removed without notice.
Warp DeprecationWarning: The symbol `warp.context.Device` will soon be removed from the public API. Use `warp.Device` instead.
Traceback (most recent call last):
  File "/home/MY_USER_NAME/physicsnemo/examples/cfd/swe_nonlinear_pino/train_swe_nl_pino.py", line 33, in <module>
    from swe_nl_pde import SWE_NL
  File "/home/MY_USER_NAME/physicsnemo/examples/cfd/swe_nonlinear_pino/swe_nl_pde.py", line 17, in <module>
    from physicsnemo.sym.eq.pde import PDE
ModuleNotFoundError: No module named 'physicsnemo.sym'

### Minimum reproducible example

```shell
As described in the description.

Relevant log output

Environment details

running on WSL-Ubuntu (24.04 LTS). CUDA Toolkit version: 12.8.0

Other/Misc.

No response

Activity

  1. SinaAkhyani commented on Feb 24, 2026

    @SinaAkhyani

    I tried the following installation commands and worked for me:

    pip install --upgrade pip
    pip install ninja
    pip install torch==2.8.0 torchvision==0.23.0
    pip install nvidia-physicsnemo
    pip install nvidia-physicsnemo-sym --no-build-isolation

  2. ShawnLiaoyx commented on Feb 27, 2026

    @ShawnLiaoyx
    Author

    I tried the following installation commands and worked for me:

    pip install --upgrade pip pip install ninja pip install torch==2.8.0 torchvision==0.23.0 pip install nvidia-physicsnemo pip install nvidia-physicsnemo-sym --no-build-isolation

    Thanks for replying. This way worked for me as well. The problem is that pip install packages are too old and are not compatible with examples right now. When installing the version as recommend by README.md, the problem I described in the issue happens.

    I finally figured out that the error was because physicsnemo.sym installed from pip was not under physicsnemo, which was installed from uv. I added the following code to physicsnemo/__init__.py to solve the problem:

    # in the beginning of physicsnemo/__init__.py
    # to make physicsnemo.sym work
    from pkgutil import extend_path
    __path__ = extend_path(__path__, __name__)
    

    Hopefully the dev team can help to make the installation of physicsnemo and physicsnemo.sym more unified. Incorporating my modification could be a way.

  3. ktangsali commented on Apr 29, 2026

    @ktangsali
    Collaborator

    Closing as part of the archival of this repository. The key components have been upstreamed to NVIDIA/physicsnemo. Please refer to the v2.0 Migration Guide and feel free to re-open your issue there if it is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ? - Needs TriageNeed team to review and classifybugSomething isn't workingexternalIssues/PR filed by people outside the core team

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions