Install
It is recommended to read the Packages section first to understand the packages organisation.
Prerequisites
DeepPhysX packages have the following dependencies :
Package |
Dependency |
Type |
Install |
---|---|---|---|
DeepPhysX_Core |
Required |
|
|
Required |
|
||
Required |
|
||
Required |
|
||
DeepPhysX_Sofa |
Required |
||
Required |
|||
Optional |
|||
DeepPhysX_Torch |
Required |
|
Note
DeepPhysX.Sofa has a dependency to Caribou to run the demo scripts from
Examples/SOFA/Demo
since implemented simulations involve some of its components.
Install
Install with pip
DeepPhysX packages are all registered on PyPi.
They can easily be installed with pip
:
$ pip3 install DeepPhysX
$ pip3 install DeepPhysX.Sofa
$ pip3 install DeepPhysX.Torch
Then, you should be able to run:
$ pip3 show DeepPhysX
$ pip3 show DeepPhysX.Sofa
$ pip3 show DeepPhysX.Torch
import DeepPhysX.Core
import DeepPhysX.Sofa
import DeepPhysX.Torch
Install from sources
DeepPhysX packages must have the following architecture. These detailed instructions will build such an installation:
DeepPhysX
├── Core
├── Sofa
└── Torch
Start by cloning the DeepPhysX source code from its Github repository in a directory named DeepPhysX/Core
:
$ mkdir DeepPhysX
$ cd DeepPhysX
$ git clone https://github.com/mimesis-inria/DeepPhysX.git Core
Then, you can add compatibility layers to your DeepPhysX environment and install packages:
Option 1 (recommended): run one of the
setup_.py
scripts that handle the installation of all packagesUse
setup_user.py
to install and manage packages withpip
as non-editable.$ python3 setup_user.py
Use
setup_dev.py
to link packages in the site-packages.$ python3 setup_dev.py set
Note
Both scripts will asks the packages to install and will automatically clone missing packages.
Option 2: clone the corresponding Github repositories in the created
DeepPhysX
directory, then install packages manually.# Clone compatibility layers $ git clone https://github.com/mimesis-inria/DeepPhysX.Sofa.git Sofa $ git clone https://github.com/mimesis-inria/DeepPhysX.Torch.git Torch # Install packages manually $ cd Core ; pip3 install . $ cd ../Sofa ; pip3 install . $ cd ../Torch ; pip3 install .
Finally, you should be able to run:
# If installed with pip
$ pip3 show DeepPhysX
$ pip3 show DeepPhysX.Sofa
$ pip3 show DeepPhysX.Torch
# In both cases
import DeepPhysX.Core
import DeepPhysX.Sofa
import DeepPhysX.Torch