Configuring PATHs for installed Python packages

   2838   1   1
User Avatar
Member
351 posts
Joined: June 2016
Offline
Hi
novice Python user trying to get ytini (Houdini for Astronomy http://ytini.com) up and running on my Mac.

Followed instructions, using miniconda and then installed the yt package.
Confirmed that it is correctly installed.

But from within Houdini's Python shell when I try and do an import yt I get a package not found error.

I assume my pathing is wrong.
The install directions here
http://ytini.com/getstarted.html [ytini.com]

suggest modifying your .bash_profile which I've done after first making necessary changes.
But the directions assume there is a yt-conda directory
/Users/<userfoo>/yt-conda/bin

and also a yt-conda/sbin directory
/Users/<userfoo>/yt-conda/sbin

but I have neither. Only the following
/Users/<userfoo>/miniconda3/bin

What changes should I make to my pathing to make Houdini recognize the yt package install?
Thanks!
Edited by art3mis - July 24, 2018 12:40:20
User Avatar
Member
321 posts
Joined:
Offline
Conda is all about managing custom Python environments… what I do is first create a new conda environment with a Python version that matches the version Houdini is using. Otherwise I believe conda defaults to Python 3, which doesn't work in Houdini.

conda create -n 'yt-conda' python=2.7.14

Then activate that environment and install yt within there:
source activate yt-conda
conda install -c conda-forge yt

Then source Houdini as usual and run. You should be able to import within Houdini after that.
  • Quick Links