Using other python modules with Houdini

   2451   0   1
User Avatar
Member
207 posts
Joined: Nov. 2015
Offline
Hi there;

I have a project for which I would like to use python + Houdini. My problem is that I need some python packages that do not natively ship with Houdini (e.g scipy), and so I'm trying to figure out an elegant way to resolve this issue.

A friend suggested one thing I could do was use hython to install the python packages I need. This sounds like a nice solution! My first course of action was to upgrade pip itself, which I did like this (I'm on a mac):

hython -m pip install -U pip

This threw and error, however:

Could not install packages due to an EnvironmentError: [Errno 13] Permission denied: '/Applications/Houdini/Houdini19.0.455/Frameworks/Python.framework/Versions/3.7/bin/pip3'
Consider using the `--user` option or check the permissions.

I figured this was a permissions issue, so I did:

sudo hython -m pip install -U pip

This seemed to work, but offered warnings:

The directory '/Users/[me]/Library/Caches/pip/http' or its parent directory is not owned by the current user and the cache has been disabled. Please check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.
The directory '/Users/[me]/Library/Caches/pip' or its parent directory is not owned by the current user and caching wheels has been disabled. check the permissions and owner of that directory. If executing pip with sudo, you may want sudo's -H flag.

This made me a little nervous, but I forged ahead to install scipy:

sudo hython -m pip install scipy

which seems to work, but also offered this warning:

WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv

These warnings lead me to suspect I'm not doing something right, so rather than hose my system I thought I would stop and come here for help.

How should I do this?
  • Quick Links