fx notes

Search

Search IconIcon to open search

Setting up Anaconda and Houdini for 3D Deep Learning on Linux

Last updated Jun 4, 2022 Edit Source

# Installation

To get started install Anaconda and run the following commands in your terminal:

( hou is the name of the new enviroment and python 3.7.4 is required because this is the version used in Houdini )

1
conda create -n hou python=3.7.4
1
conda activate hou

Then install libraries like for example PyTorch 3D. ( For simplicities sake we will go forward with vanilla PyTorch. )

1
conda install pytorch torchvision torchaudio cudatoolkit=11.3 -c pytorch

As jpparkeramnh pointed out in this SideFX forum post you have to export the LD_PRELOAD variable.

1
export LD_PRELOAD=$CONDA_PREFIX/lib/libpython3.7m.so

# .bashrc Modifications

I also recommend sourcing Houdini in the terminal.

To do so first open the .bashrc in the terminal

1
nano .bashrc

and add the following lines to your .bashrc

1
2
3
4
5
6
cd /opt/hfs19.0/
source ./houdini_setup
cd ~
conda activate hou
export LD_PRELOAD=$CONDA_PREFIX/lib/libpython3.7m.so
alias expenv='LD_PRELOAD=$CONDA_PREFIX/lib/libpython3.7m.so'

Now you should be able to just activate your respecitve conda environment, export the correct LD_PRELOAD variable by typing “expenv” and then run houdini from there by typing “houdini“.

To check if everything is running as expected open the Houdini Python shell and type:

1
import torch 

If it doesn’t give you any errors you should be good to go.


Interactive Graph