Jump to content
Sign in to follow this  
GeordieM

Setting python include path to external pyd library

Recommended Posts

Hi all, I know python but am just starting out uncovering how to get things really working.

 

I have a .pyd file which I need to reference in a script but it cannot be moved into any Houdini folders, it has a lot of dependencies to relative paths in it's folder (a whole game engine).

 

I'm running Win 7 so I'm relying on Houdini's Python not the system install.

 

Where/how do I set an include path to external Python libraries in Houdini's Python?

 

Thanks!

 

Geordie

Share this post


Link to post
Share on other sites

Thanks for the reply edward!

 

What I'm wondering though is how do most people set this up in Houdini.  Do people usually set PYTHONPATH in houdini.env or use sys.path.append in a startup script or something else?

 

Thanks!

 

Geordie

Share this post


Link to post
Share on other sites

It's an old thread but replying here because I don't think the documentation is very clear on this so it took me a while to refresh myself on how to do this. There are a few options, such as setting in your pythonrc.py, but I find it easiest to add the following to my 123.py and 456.py files since I already set the JOB variable there:

import sys
sys.path.append("your_path")

 

  • Thanks 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×