-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Does not work on macOS 12.3 #91
Comments
For anyone who has upgraded to 12.3 and has not found an alternative yet I created a very hacky workaround for this using pyenv. I have created a release package for ease of use, make sure to read the updated README or just the new section. |
Awesome work, @willemml! 👏 |
Thank you! |
I wonder do you have immediate plans to update the workflow for python 3 support? |
I personally do not have plans to update it to python 3 in the near future, I did a little bit of work on it a couple weeks ago but found that the dependency tree was quite deep, but I might try again later if I have time (this could be months from now because I already have it working even with the suboptimal pyenv method). |
@matkovsky For me it was few things that didn't quite work and I needed to fix them. |
Hey @CaptainMalReynolds if you could PR that to my repo, or just let me know and I will add it myself, that would be great, and another thing I would be to automatically determine (or have an option selected on install) the location of then pyenv executable. I will try to find a quick solution for this. |
I made some more changes that should hopefully fix the problems people have been having, (implemented a slightly different version of what CaptainMalReynolds did and then also using it in the workflow scripts). |
@willemml Perfect, this works great, thanks for your quick fix and all the work you put into this. :) |
Still got the problem: [01:27:07.539] Logging Started... |
@avxkim could you please run |
/Users/alexanderkim/.pyenv - doesn't exist on my machine.
|
That is because you need to install pyenv, please read the README in my PR. |
followed your readme and now it works, thanks. |
Nice work, thanks. Since your fork has no issue section I'll post here.
|
Oh neat, I didn't realize that was disabled by default... I have enabled it for future use.
Only reason I didn't do this is because some other environment variables were not working and all of the macOS systems I have used had
Yeah this should be fixed, I guess I should try to find a better way of doing that... I only did it this way because it was simplest and I wanted to avoid slowdowns. I am also not sure how Alfred workflow variables work (this is my first time making/modifying advanced workflows, and using pyenv), so maybe there is a way of doing it when the workflow is added to avoid adding delay. Maybe invoke a bash script that handles reading a file to get the path of the pyenv version and if file not found then use grep to find it and write to file? There is probably a better way of doing it. |
At least you can trust
Thought of that too, something like |
I wanted to ask you if adding additional currencies is broken now as well? For example, I added BNB in the list of currencies in active_currencies.txt but it doesn't recognize it anyway no matter what I do. I also added my API key. Is there something I'm missing here? And on a side note, convinfo was broken as well because of the python path being incorrect now, so if I point it to the pyenv one same as in other places it works. |
Thanks for this. I sync my Alfred preferences in Dropbox between two machines that have different usernames. What would you recommend for dynamically pulling that? |
Hi @willemml - I'm getting this error: Is this because pyenv got installed to the wrong folder or something? |
@kenanmike yes, it is most likely that you have the wrong pyenv path set. @CaptainMalReynolds I do not know if adding more currencies is broken as I have never tried adding another. Also it's strange that convinfo wasn't working for you because it was for me, maybe I didn't update it to use dynamic paths... |
@kenanmike which version are you using? As far as I know the latest release on my fork fixes this, it looks like you are using my original "fix". |
Working for me now. You're a beast, thanks! |
Thanks for your efforts. Unfortunately I don't use Homebrew, I won't use Homebrew, and I don't recommend anyone use Homebrew. pip refuses to install pyenv and unfortunately Macports doesn't have pyenv, which means I would need to install it the old fashioned way (earrrrrrrn it?) or port it myself. Before I go down that road, could this be made to work with virtualenv? |
@hexadecagram I used Homebrew because it was handy (I already used it) and this was quickly hacked together. I know very little about Python but from what I know of quickly reading some SO threads on virtualenv I do not think it would work for this purpose. It looks like virtualenv just isolates the installation of Python packages but does not allow you to use specific versions of Python. But if someone knows otherwise do let me know! |
@hexadecagram Please note that pyenv is by design not installed through pip. See https://pypi.org/project/pyenv/. You could add it to MacPorts ports, if you want it. It should be trivial to work in a pyenv created virtualenv - instead of the hardcoded Python version, use |
@willemml No need to explain yourself, just realize that changing ownership of /usr/local from root:wheel to really anything else is a horrible security risk, especially if it is a login user's account.
@bnoctis I will give your recommendation a shot, thanks. |
FWIW, homebrew does not do that (anymore). It uses Taking a step back: |
@tcurdt That's actually very good news! Apparently you can change the install location to whatever you like but it seems Homebrew still clings to the "1 user is all you need" mentality and rids us of that "terrible inconvenience" of having to use sudo. Thanks guys, I had no idea sudo was so bad! It's coming to Linux now too. smh
I actually agree with this but I didn't say anything because unfortunately my plate is rather full at the moment so I myself cannot contribute anything. Nevertheless, having something shoestringed yet usable is certainly welcome in the meantime! |
I've done a couple python 2 to 3 upgrades (but not within Alfred). It's not too difficult but needs time and attention... neither of which I have at the moment. It looks like before alfred-convert is updated to python 3, it'd make sense for the underlying alfred-workflow package to be updated to python 3, there's issue 182 and issue 97. Issue 97 is a older/longer discussion, in it user NorthIsUp links to their python3 fork of alfred-workflow which has commits as recent as a month ago. |
Uh! Someone already did the work then?! |
I think misreading. There are two different packages – alfred-convert is built using alfred-workflow (both originally built by deanishe). It looks like work has been done to get alfred-workflow working with python3. It doesn't look like the author of the alfred-workflow-py3 has done any work on alfred-convert. If I had to guess, I'd guess that NorthIsUp did the python 3 work for a different Alfred workflow package that they use more often. |
aaaah ... ok ... that would have been too good to be true :) |
@hexadecagram, on Intel Mac, as far as I can tell, Homebrew does not change the ownership of |
this fork is migrated to Python 3 |
It's working for me on v3.7.2 & v3.7.3, thank you very much @willemml! 👏👏👏 v3.7.2
v3.7.3By the way, the pyenv path problem has be fixed on v3.7.3.
Enjoy it. |
@willemml , thanks for the fork. In your new versions, the Python path is hardcoded. is it possible to use "Workflow Environment Variables" to let users define their own python2 binary path? |
You're welcome @feigaoxyz! It looks like there is already a fork that has been ported to python 3 instead of using the hacky method that I am using. I will not be updating my fork until it breaks (at which point I will probably try the python 3 fork which is mentioned in this comment by @giovannicoppola #91 (comment)) if you want to add variables for the paths feel free to fork my repo or even make a PR. |
@willemml , noted. I'd try python3 fork :) |
Facing the same issue I decided to write my own using Dart and compile it to a standalone native binary. The binary is signed and notarized by Apple. |
@techouse I think you've got the wrong link there but I did find your fork and it works great, thanks! |
@Noobish1 Ha 🙈, thanks for letting me know. The repo is techouse/alfred-convert. |
macOS 12.3 beta 4 removes the built in Python 2.7 binary causing this workflow to break.
This workflow will need to be updated to support Python 3 if it is to be used on versions of macOS above 12.2.
The text was updated successfully, but these errors were encountered: