MWorks doesn't see some environmental variables

Hi Chris,

I am trying to run some software for camera acquisition via python. I use Mworks 12.2. I have added the path to my custom python packages and I can successfully load all of them. However, I have problem while using a specific package. The Mworks process doesn’t seem know the location of a driver, which is specified in a variable SPINNAKER_GENTL64_CTI. When I check from within Mworks python shell the variable is empty, however, in the regular shell it is present and I can use this python package without any problem.

As a proof of principle that the set-up can work I have another Mac which doesn’t have this problem. But this Mac runs on an Itel-chip and I had to use an older version of the required python package, which supports the chip. Therefore, I also had to use Mworks 10, because the package version requires python=3.8.

I tried few things, but nothing helps. I hope you could help me to solve the problem.

Best,
Vladyslav

Hi Vladyslav,

Have you tried setting the environment variable in your Python code, before you import the package that needs it? For example:

os.environ['SPINNAKER_GENTL64_CTI'] = 'whatever'
import the_package

Cheers,
Chris

1 Like