LeifJP
-
Posts
5 -
Joined
-
Last visited
Content Type
Blogs
Gallery
Downloads
Events
Profiles
Forums
Articles
Media Demo
Posts posted by LeifJP
-
-
Thanks Vitor, seem to be a good way to handle more input parameter for a script.
-
Hi.
I was stuggling with a python script, that runs as external script (with the brew installed version of python) very well, but not when switch back to python3 (and the default old version installed on Venture) in the script menu. How can I use the newer (brew)-version as well. Also putting in shebang on top of the with the path to the brew version of python work. The funny thing, in the script popup I could choose the brew installed version of php. Is the a work around or any possiblity to customize the script menu or creating in python environment for running a script in Alfred?
Thanks,
Leif
-
On 11/6/2022 at 12:45 PM, vitor said:
Welcome @LeifJP,
The workflow has icons, more nested prefpanes, and corrects others Ventura broke. You don’t have to use the workflow if you’re not bothered by any of the Ventura changes and don’t need the extra niceties, it exists for those who care about any of that.
Hi Vitor,
sorry if i offended you. But the question was serious meant. Maybe my English is not so good. But you answered my question, so I'm fine. Never the less maybe you should add that explanation to your workflow page in Alfred.app.
So sorry again and thanx for your work,
Leif
-
Hi,
just for my understanding, why I should use this workflow? I didn't test every keyword but all I test I just can access these preference pane without this workflow. As an example (the result direct result from Alfred is shown in german on a german OS, but it's the same):
What is the point I didn't got.
Thanks, Leif
Running python in a virtuell environment inside an Alfred Workflow
in Workflow Help & Questions
Posted
Hi,
I encountered an issue with a workflow I use that creates small preview tiles and saves them into a Markdown file for Obsidian. Suddenly, the script was unable to load the external libraries I had been using. Attempting to reinstall them via pip3 on the command line (I'm using a Mac M1 running macOS 14.4 with Python installed via Homebrew) resulted in the error message: 'error: externally-managed-environment.' However, I was able to resolve the issue by creating a virtual environment and installing the libraries there. Since I couldn't find a solution through Google, I developed a workaround.
Here's how I did it:
Inside the Workflow folder (e.g., ~/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow....), create a virtual environment via the terminal.
Install the necessary libraries using pip.
Call my script using a zsh script action within the workflow, like this:
Do you think there might be another way to approach this issue? I'm aware that one potential solution could involve calling pip with the option --break-system-packages, but ultimately, using a virtual environment seems like the better solution to me.
If you can read german, I wrote something more detailed in my blog https://bit.ly/48PRTwe.