NVIDIA / modulus-sym

Framework providing pythonic APIs, algorithms and utilities to be used with Modulus core to physics inform model training as well as higher level abstraction for domain experts
https://developer.nvidia.com/modulus
Apache License 2.0
165 stars 68 forks source link

🐛[BUG]: No module named 'pysdf' #103

Closed YouqiongLiu closed 8 months ago

YouqiongLiu commented 8 months ago

Version

nvidia-modulus: 0.4.0 nvidia-modulus.sym:1.2.0

On which installation method(s) does this occur?

Pip

Describe the issue

installed the latest version of nvidia-modulus.sym is using PyPi. But, the following programs cannot be run . Error importing pysdf. Make sure 'libsdf.so' is in LD_LIBRARY_PATH and pysdf is installed

import os import warnings import torch import numpy as np from sympy import Symbol, sqrt, Max

import modulus.sym from modulus.sym.geometry.tessellation import Tessellation

Minimum reproducible example

import os
import warnings
import torch
import numpy as np
from sympy import Symbol, sqrt, Max

import modulus.sym
from modulus.sym.geometry.tessellation import Tessellation

Relevant log output

Error importing pysdf. Make sure 'libsdf.so' is in LD_LIBRARY_PATH and pysdf is installed
--------------------------------------------------------------------------- ModuleNotFoundError Traceback (most recent call last) /home/wangtai/youqiongliu/pinn-blood-flow-main/examples/cylinder/test.py in line 1 ----> 26 from modulus.sym.geometry.tessellation import Tessellation File ~/anaconda3/envs/python3.10_pytorch2.1/lib/python3.10/site-packages/modulus/sym/geometry/tessellation.py:25 22 from sympy import Symbol 24 try: ---> 25 import pysdf.sdf as pysdf 26 except: 27 print( 28 "Error importing pysdf. Make sure 'libsdf.so' is in LD_LIBRARY_PATH and pysdf is installed" 29 ) ModuleNotFoundError: No module named 'pysdf'

Environment details

No response

Other/Misc.

No response

ktangsali commented 8 months ago

@YouqiongLiu, pysdf is currently available only via Docker container method. Please try the docker method of install as described here: https://github.com/NVIDIA/modulus-sym?tab=readme-ov-file#container to use the STL geometry features.