Jump to content

All my python scripts are broken and I really do not know why.


Recommended Posts

Last week I was using my workflows in Alfred, but today I got a very undesirable surprise. All my python scripts stopped to work. Basically, all my python scripts are receiving ModuleNotFound problems, besides all they worked fine last week. I use the standard

 

‘bin/zsh’ python3 + full/path/python/file. 
 

During this week I updated to Sonoma 14.5, so maybe here is the problem? I also do not understand how to put the “Path”, is there a way to to this globally? Because re-install all my python modules into a new “Path” is impractical. 

Link to comment
Posted (edited)

Hey @giovanni, thank you!

Unfortunately, your suggestion did not work. But I manage to solve the problem. I will post here my solution, maybe this can help other people with the same problem.


First of all, the problem was caused by PATH, so, to fix this, I changed the PATH variable on the top of the workflow. (Well, I still do not know why the workflow worked before, anyway, this fixed the problem). 
 

Step 1

 

You need to find the PATH of your system. Go to the terminal and type 

 

echo $PATH 

 

According to the image:


CapturadeTela2024-06-27s15_59_00.thumb.png.bf0f4f386b3d499ef4b8d11d2b985400.png
 

Copy this entire line and save for further use.


Step 2

 

On the workflow menu, you choose the option “(x)” as in the image (red square)

 

CapturadeTela2024-06-27s15_36_45.thumb.png.19d773caa0cd36b8428ec23f474e5612.png
 

Step 3 


On the window that will open, select “Environment Variables” as in the image (red square) 

 

CapturadeTela2024-06-27s15_42_41.thumb.png.59dd4b186eaf04d41058efe08917652d.png


Step 4

 

Click on the button “+” on the bottom left of the window as in the image (red square)

 

CapturadeTela2024-06-27s15_43_33.thumb.png.c7ce14551ba2e1d9a49b692108f3a963.png
 

Step 5 

 

At the column “Name” put “PATH”  (red square in image) at the column “Value” paste the line that you copied in the Step 1 (blue square in image).

 

CapturadeTela2024-06-27s15_44_48.thumb.png.31fc9333e2591223964b4a8e33455dd0.png

 

Click in “Save” at the bottom left and it is finished!
 

This procedure solved the issue for me. 

Edited by Guilherme
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...