johnlindquist / kit

Script Kit. Automate Anything.
https://scriptkit.com
MIT License
3.91k stars 138 forks source link

Python venv issue in kit $ command #1314

Open mizagog opened 1 year ago

mizagog commented 1 year ago

Hi, I'm having troubles running python with the $ command or exec command on mac, running into issue with python modules not working. running the same commands in Terminal / Webstorm works, but when running it with kit, i get the error.

image
johnlindquist commented 1 year ago

@mizagog the $ is an alias for the "zx" package here:

https://github.com/google/zx

Please check their docs for changing working directories, adding directories to the PATH.

When something is "missing", 99% of the time it's a PATH issue

mizagog commented 1 year ago

I'll have a look

mizagog commented 1 year ago

Couldn't make it work. Python in $ is running with other ENV variables, and for standard shell it's enough to run from the python executable located in the VENV folder to get to the correct pip and modules....

// await exec('cd /Users/****/PycharmProjects/pythonProject/ && ./venv/bin/python ./my-script.py test')