the1gofer Posted Friday at 07:53 PM Share Posted Friday at 07:53 PM I've used this for a while with no issues. Now I'm not sure what has changed, Alfred doesn't seem to want to run the script now. Nothing is wrong with the script itself because I can run it through vs code or my terminal just fine. Here is bash script #!/bin/bash source /Path/to/Scripts/'Link Scraper'/venv/bin/activate python /Path/to/Scripts/'Link Scraper'/format_notes.py Here is the error [11:37:37.411] ERROR: TCPA Tools[Run Script] DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 DEPRECATION: Configuring installation scheme with distutils config files is deprecated and will no longer work in the near future. If you are using a Homebrew or Linuxbrew Python, please see discussion at https://github.com/Homebrew/homebrew-core/issues/76621 Traceback (most recent call last): File "/Path/to/Scripts/Link Scraper/format_notes.py", line 2, in <module> import pandas as pd ModuleNotFoundError: No module named 'pandas' Pandas is installed because I can run the script in my terminal with the same commands...Any suggestions? Link to comment
vitor Posted Friday at 08:12 PM Share Posted Friday at 08:12 PM See Understanding the scripting environment. It’s not just the script that matters, its context does too, and that seems to be what has changed. Link to comment
the1gofer Posted Friday at 11:38 PM Author Share Posted Friday at 11:38 PM according to that, it shouldn't be an issue if I am using the full path, which I am. Link to comment
vitor Posted Saturday at 12:27 AM Share Posted Saturday at 12:27 AM (edited) It’s about the full path to the tool. python isn’t a full path. But that may not apply here, there’s a reason multiple approaches are listed. The difference is in your shell environment, that’s what you have to replicate. If you’re using the script just for yourself, use the third method at the bottom to load your shell files. To get help beyond that you’ll have to provide more information about your setup. What’s your macOS version? What’s your python version? How have you installed the module? Edited Saturday at 12:47 AM by vitor Link to comment
the1gofer Posted Saturday at 03:17 AM Author Share Posted Saturday at 03:17 AM I'm afraid I don't understand. I updated #!/bin/bash source "${HOME}/.zshrc" /Path/to/Scripts/'Link Scraper'/venv/bin/activate python /Path/to/Scripts/'Link Scraper'/format_notes.py and #!/bin/bash source "${HOME}/.zshrc" /Path/to/Scripts/'Link Scraper'/venv/bin/activate python3 /Path/to/Scripts/'Link Scraper'/format_notes.py with no effect if I go directly to the terminal, open that venv, then try to install it, it says it's installed. However running the script from the terminal yields the same error. works fin in vs code however with the same venv running. I'm running mac os 13.2.1, on a m1 macbook. Working on it further, it seems like it works in vs code even when it's not in the venv.... Link to comment
vitor Posted Saturday at 08:12 AM Share Posted Saturday at 08:12 AM You’re using Bash but sourcing a Zsh file. As per above, without the requested information it’s not possible to help further. And please provide the real workflow you’re using. Hiding the paths is only going to make helping more difficult. Link to comment
the1gofer Posted Saturday at 03:28 PM Author Share Posted Saturday at 03:28 PM I'm sorry to have bothered you. I guess I'm to stupid. Link to comment
Terminal Posted Saturday at 04:49 PM Share Posted Saturday at 04:49 PM 1 hour ago, the1gofer said: I'm sorry to have bothered you. I guess I'm to stupid. If you chose to get offend that’s fine. @vitor is being clear that to further assist you, it’s best if you can upload the workflow file. that has nothing to do with one’s intelligence vitor 1 Link to comment
vitor Posted Saturday at 05:36 PM Share Posted Saturday at 05:36 PM Indeed. Think of it like going to the doctor and saying your stomach hurts. There are a myriad of reasons for that so the doctor needs more information, like what do you eat and how regularly. If you don’t provide the information, there’s nothing which can be done to help. A few guidelines and generic medications can be prescribed but it’s impossible to know for sure what the cause is without knowing more. Like every body is different, every computer is configured a different way. Without knowing more about your setup all we can do is shoot in the dark which isn’t productive for any party. Link to comment
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now