Tuesday, 15 September 2020

I have a Python library that I want to use via child_process, however it requires a .command file to be run first to set certain variables. Not sure how to go about doing this.

Hey guys, so I have a library which converts a file. The way you use this library is to first run USD.command which looks like this#!/bin/sh BASEPATH=$(dirname "$0") export PATH=$PATH:$BASEPATH/USD:$PATH:$BASEPATH/usdzconvert; export PYTHONPATH=$PYTHONPATH:$BASEPATH/USD/lib/python $SHELL Then running a file called usdzconvert will correctly run the conversion. If the .command file variables aren't set, you will get this errorError: failed to import pxr module. Please add path to USD Python bindings to your PYTHONPATH Makes sense, however I'm not sure how to use a .command file or my understanding on environment variables isn't enough to quite get this right. Any help or clarification would be greatly appreciated. Thanks!

Submitted September 16, 2020 at 01:24AM by overcloseness

No comments:

Post a Comment