mimesis-inria/DeepPhysX

Numpy Error with Installation on Ubuntu 22.04

NMontanaBrown opened this issue · 1 comments

Hi team, really cool work. Would like to give this a spin but am having trouble getting it running on python 3.8 if possible.

Issue Description

Following the install instructions and running a demo like DPX -r liver leads to the following issue:

DPX --run liver
Traceback (most recent call last):
  File "interactive.py", line 11, in <module>
    from DeepPhysX.Core.Pipelines.BasePrediction import BasePrediction
  File "/home/nina/miniconda3/envs/sofa-frameworks/lib/python3.8/site-packages/DeepPhysX/Core/Pipelines/__init__.py", line 9, in <module>
    exec(f"from DeepPhysX.Core.Pipelines.{module[:-3]} import {module[:-3]}")
  File "<string>", line 1, in <module>
  File "/home/nina/miniconda3/envs/sofa-frameworks/lib/python3.8/site-packages/DeepPhysX/Core/Pipelines/BaseDataGeneration.py", line 3, in <module>
    from vedo import ProgressBar
  File "/home/nina/miniconda3/envs/sofa-frameworks/lib/python3.8/site-packages/vedo/__init__.py", line 234, in <module>
    np.warnings.filterwarnings('ignore', category=np.VisibleDeprecationWarning)
  File "/home/nina/miniconda3/envs/sofa-frameworks/lib/python3.8/site-packages/numpy/__init__.py", line 284, in __getattr__
    raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'warnings'

Looking up the error, I deprecate the installation of numpy==1.24. to 1.23.5, which leads to a clean run.

Replication

Running the following:

conda create --name sofa-frameworks python=3.8
conda activate sofa-frameworks
pip install DeepPhysX DeepPhysX.Sofa DeepPhysX.Torch
DPX -r liver

Fixed by:

conda create --name sofa-frameworks python=3.8
conda activate sofa-frameworks
pip install DeepPhysX DeepPhysX.Sofa DeepPhysX.Torch
pip install numpy==1.23.5
DPX -r liver

It would be worth fixing the requirements as otherwise the package does not install properly? Can I contribute this fix?

Hi @NMontanaBrown, thank you for your clear report! Nice to see that you solved this by yourself :)

I encountered this error yesterday too. This error occurs with the 'vedo' library that we use in the framework.
I haven't been able to spend time on this yet, but as you suggested I could complete the requirements.

Do not hesitate if you have any issue with DeepPhysX!