Installing and Using Scipy in Houdini.

file Banner.png
Click here to get to the Guided Houdini Files.

MAJOR UPDATE (May 2020):
Houdini is moving from python 2 to python 3. We recommend using python 3 because, finally, this enables us to run Scipy inside of Houdini again. The previous installation guide can be found below the current guide.


Windows Logo, Google Discloses Actively Exploited Windows ...

MICROSOFT WINDOWS INSTALLATION GUIDE:

  1. Install a Houdini version containing python3. Currently: Check out the daily builds website and grab the Python 3 Tech Preview (or the next full Houdini release once python3 becomes default).
  2. Download get-pip.py from [bootstrap.pypa.io] (save as a file) and place it in your Houdini python37 folder (e.g. C:\Program Files\Side Effects Software\Houdini 18.0.456\python37).
  3. Run windows cmd with admin rights and navigate to your python folder (e.g. cd “C:\Program Files\Side Effects Software\Houdini 18.0.456\python37”).
  4. Execute the command “python3.7.exe get-pip.py” and wait for pip to finish installing. pip.exe should now appear in the /Scripts folder.
  5. Execute the command “python3.7.exe -m pip install scipy” and wait for Scipy to install.
  6. Finished! Your Houdini should now work with scipy. No restarting of Houdini required.

This image has an empty alt attribute; its file name is image.png

MAC AND LINUX INSTALLATION GUIDE:

Analog to the version above. A specific description is coming soon after testing.


TESTING IF SCIPY WORKS:

Just place a python node and insert the following code:

# if you get no error messages for importing these
# SciPy packages then your SciPy works!
import scipy
import scipy.sparse as sp
import scipy.sparse.linalg as la

 

 

 

 




Important update!

SideFX has removed 16.5 from the daily builds page. If you want Houdini 16.5 you now have to go to ftp://ftp.sidefx.com/public/Houdini16.5/.

(OUTDATED)

INSTALLATION GUIDE FOR Houdini 16.5 or lower.

Only follow these instructions if you have to use Houdini 16.5 or lower. We very much recommend sticking to the up to date way of installing Scipy in Houdini with python3.


Note1: this works with Houdini 16.5. Other Houdini versions have not been confirmed by us yet, but it should work.

Note2: For windows, this way of installing scipy does not function anymore with Houdini 17. Please follow this post: https://www.sidefx.com/forum/topic/58442/
To get older version of Houdini take a look at the daily builds page from SideFX.

Notes3: The newest version of Anaconda2 does not work even with version before Houdini 17.  For windows users we now recommend installing Houdini 16.5 from the official distribution and installing Anaconda2-2.4.0-Windows-x86_64.exe from the official distribution. Completing the instructions of this post with with the above mentioned files should make this work.

You may want to install the anaconda distribution to get the scipy python files. This distribution is available for windows, linux and mac. There are also other distributions available.

MICROSOFT WINDOWS INSTALLATION GUIDE:

Image result for warning sign

Window’s version of Houdini has its own’s version of python installed and does not use the default python location. Houdini uses python 2.7, NOT python 3.6. Make sure that you install the right scipy version. In anaconda for example, avoid the python 3.6 download.

NOT36.PNG
HANDS OF PYTHON 3.6!
YES27.PNG
Python 2.7 is your friend.

Then go into the anaconda directory that is usually:
C:\Users\USERNAME\Anaconda2

user anaconda2 before transfer.PNG
USER\anaconda2 directory before transfer.

and copy all the files from there into the Houdini python directory
C:\Houdini_Install_Directory\python27

python27 inside Houdini before scipy.PNG
python27 directory inside Houdini before scipy.
98.gif
Copy and paste all the anaconda files to \python27 on windows.

Scipy should now work fine.

 

Courtesy for the following Mac and Linux guides go to Chern et. al.

Mac Installation Guide

You don’t need to do anything. Mac already has SciPy.

Linux Installation Guide

Install SciPy from http://www.scipy.org/install.html. In particular it is recommended to install the Anaconda pack version 2.7. On Linux, Houdini ’s internal Python will read the Python library installed on your machine.


Using Scipy


A great reason to use scipy will be the scipy sparse methods that speed up the matrix processing. A python node with scipy will be able to import scipy commands as seen in the code below with sparse.

Print Friendly, PDF & Email