Been fighting a really weird problem trying to get ImageMagick working when called via Python subprocess. Basically, there are some ImageMagick-required environment variables, which I set in my .bashrc.

So far, so good. I can echo all the vars in the terminal, no problem. But if I run ENV or printenv *ONE* of the variables is missing from the list. It is also missing when I call Python subprocess with shell=True; even if I echo it there. The other vars are there, just the one isn't.



Followup: The fix was to remove ImageMagick from my .bashrc and system altogether and reinstall it using 'brew'. (I'm running OSX.) Now ImageMagick works properly from Python subprocess.

Downside? I had to run 'brew'. Took over an hour with my slow Internet and all the updates brew had to execute before it got around to doing what I asked it to do.

Sign in to participate in the conversation
Rusted Neuron – an Intentional Community

The social network of the future: No ads, no corporate surveillance, ethical design, and decentralization! Own your data with Mastodon!