You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is on mac os 15.1.1, Intel - but I believe the issue is that I am using pyenv - https://github.com/pyenv/pyenv - for my python environments and virtual environments.
(In case it is unfamiliar, pyenv is a set of tools and shims that A) helps manage compilation of arbitrary versions and variants of Python, B) automates/centralizes virtualenvs on top of those multiple versions of Python that you create.)
In general, Zed identifies the relevant project folder's python environment automatically, or at least uses the default "global" virtual environment that can be set for pyenv.
Error log:
[INFO] attempting to start language server "python-refactoring", path: "/Users/blah/blah/blah", id: 6
[ERROR] Failed to start language server "python-refactoring": cst_lsp must be installed and available in $PATH=/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin:/Library/Apple/usr/bin:/usr/local/zfs/bin:/Users/username/.cargo/bin"
Here is a more legible version of the PATH variable above - it contains some items from homebrew but does not contain the pyenv folders, which default to /Users/username/.pyenv/shims and /Users/username.pyenv/bin).
/usr/local/bin
/System/Cryptexes/App/usr/bin
/usr/bin
/bin
/usr/sbin
/sbin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin
/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
/Library/Apple/usr/bin
/usr/local/zfs/bin # I'm not sure how homebrew is injecting this one, it is not even part of my profile.
/Users/username/.cargo/bin
My normal shell environment (bash) sources ~/.profile, which injects the pyenv shim, I can then which for items manually and find them in their slightly odd location.
$ which cst_lsp
/Users/username/pyenv/shims/cst_lsp
This setup as required implies that there is a canonical way to get cst_lsp into the automatically loaded path, but that mechanism is not documented.
If the recommendation is to just run pip install cst-lsp to install the package without elaboration, this only succeeds for Python installations in the system path (strongly recommended against) or a user-installed and canonically path'd Python instance, for example via homebrew.
I think the best solution would be to provide a manual command to run cst_lsp.
While I have not tested, I suspect whatever configuration requirements currently exist would also not be compatible with Anaconda, which comparable to pyenv in how it works.
The text was updated successfully, but these errors were encountered:
This is on mac os 15.1.1, Intel - but I believe the issue is that I am using pyenv - https://github.com/pyenv/pyenv - for my python environments and virtual environments.
(In case it is unfamiliar, pyenv is a set of tools and shims that A) helps manage compilation of arbitrary versions and variants of Python, B) automates/centralizes virtualenvs on top of those multiple versions of Python that you create.)
In general, Zed identifies the relevant project folder's python environment automatically, or at least uses the default "global" virtual environment that can be set for pyenv.
Error log:
Here is a more legible version of the PATH variable above - it contains some items from homebrew but does not contain the pyenv folders, which default to
/Users/username/.pyenv/shims
and/Users/username.pyenv/bin
)./usr/local/bin /System/Cryptexes/App/usr/bin /usr/bin /bin /usr/sbin /sbin /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin /var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin /Library/Apple/usr/bin /usr/local/zfs/bin # I'm not sure how homebrew is injecting this one, it is not even part of my profile. /Users/username/.cargo/bin
My normal shell environment (bash) sources
~/.profile
, which injects the pyenv shim, I can thenwhich
for items manually and find them in their slightly odd location.So
zed-python-refactoring/src/python_refactoring.rs
Line 15 in f1492e9
This setup as required implies that there is a canonical way to get
cst_lsp
into the automatically loaded path, but that mechanism is not documented.If the recommendation is to just run
pip install cst-lsp
to install the package without elaboration, this only succeeds for Python installations in the system path (strongly recommended against) or a user-installed and canonically path'd Python instance, for example via homebrew.I think the best solution would be to provide a manual command to run
cst_lsp
.While I have not tested, I suspect whatever configuration requirements currently exist would also not be compatible with Anaconda, which comparable to pyenv in how it works.
The text was updated successfully, but these errors were encountered: