You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I run python, I use a virtual environment located inside the Tasker folder. However, the Python binaries there are actually softlinks to the system Python. Running them from inside the folder adds the virtual environment's packages to the python path, but running it from outside doesn't give you access to those packages.
Right now, when I need to run from inside a virtual environment, I import sys and add the library path to it. It happened so often that I just made a task that does that and pastes in the rest of the code into an empty file that I then run.
The text was updated successfully, but these errors were encountered:
Symlink file path is used instead of target path because some utils don't work if target path is used. Will have to add another option to disable the behaviour. I don't really understand your setup from the info provided to suggest alternatives.
I have python installed system-wide, and I created a venv folder for tasker stuff because I don't want to install e.g. numpy or arrow globally.
If I run it directly (e.g., with -c "print('hello world')"), it does not have access to any of the packages in the venv. If I run it on a file, it's the same problem.
What I ended up doing is this:
Right before running anything, I add the venv path to the sys path.
Adding the toggle would make it possible to simplify things by allowing me to run certain things directly, but it works fine in this configuration too, so there's no rush for me.
Feature description
When I run python, I use a virtual environment located inside the Tasker folder. However, the Python binaries there are actually softlinks to the system Python. Running them from inside the folder adds the virtual environment's packages to the python path, but running it from outside doesn't give you access to those packages.
Right now, when I need to run from inside a virtual environment, I import sys and add the library path to it. It happened so often that I just made a task that does that and pastes in the rest of the code into an empty file that I then run.
The text was updated successfully, but these errors were encountered: