4 ms·
Could you elaborate on the issues you've been seeing in Zed? I've been using asdf as a version manager for Python for quite some time and haven't really had any
by codethief 2y ago
Could you elaborate on the issues you've been seeing in Zed? I've been using asdf as a version manager for Python for quite some time and haven't really had any issues.
- xrd 2y agoYou are using asdf and zed successfully? I'm so glad to hear this. I removed asdf because I could not get it to recognize the pyproject.toml file. This is working in harmony for you? With Zed and a venv (from python -m venv .venv for example), Zed properly recognized installed packages and provided type hinting and docs, but when I switched to asdf it did not seem to work. But, I was new to asdf and perhaps was using it incorrectly. I was always assuming that when I'm in the command line, running asdf to use the right python works because the path is correctly established. But, when I run zed, it launches without the path setup step, and things went badly. I'm just speculating, but I could not get type hinting and didn't know how to fix it.
- codethief 2y agoSorry, I should have clarified: I have not used Zed but I've successfully used asdf (with Python) with many other IDEs and the challenges are usually the same. > I was always assuming that when I'm in the command line, running asdf to use the right python works because the path is correctly established In a typical setup asdf is installed by sourcing some shell script in your .bashrc (which will then add shims to your path). It might very well be that Zed didn't execute `python` in an interactive shell, so the shims weren't available. There are various solutions here but the easiest is probably to add the shims to your PATH yourself. As for venvs, using asdf doesn't mean you should no longer use venvs since all projects using the same Python version (managed by asdf) will still share the same site-packages folder. In other words: I'd still recommend setting up a venv, e.g. through Poetry or uv/Rye. Besides, once .venv/bin/python symlinks the asdf Python shim, Zed might have an easier time finding the right binary, too.