-
Notifications
You must be signed in to change notification settings - Fork 21
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
Cannot load python interpreter #26
Comments
hey @essembeh, I have the same situation with ShellCheck extension and my hack was use a little script to call the
Here Codium and Code detect My little hack for shellcheck to roundabout is this: "shellcheck.executablePath": "/home/nslpr/bin/shellcheck-spawn", shellcheck-spawn: #!/usr/bin/env sh
/usr/bin/env -- flatpak-spawn --host shellcheck "$@" Don't forget to give exec permission to the script chmod u+x /home/nslpr/bin/shellcheck-spawn I think maybe could you try to start with something like this "python.pythonPath": "/home/nslpr/bin/python-spawn" python-spawn: #!/usr/bin/env sh
/usr/bin/env -- flatpak-spawn --host .venv/bin/python "$@" but to me, the relative path for the binary Cheers, and thanks for report this. =) |
Hi @noonsleeper Clever workaround, I'll use it. I suspected that the Python extension was maybe missing something to use the flatpak-spawn command, you confirmed this as the command cannot contain spaces, maybe I should open the ticket in the extension project for them to provide a way to run command with spaces? Thanks again. |
I think is a vscode's problem, the interpretation of any string with white spaces in double quote run in the same problem. But I'm not 100% sure. |
hey @essembeh due to the microsoft/vscode-python#14901 desition I'll close this issue =(. If you still having problems with, please don't hesitate to open a new ticket. =) |
Hey, too bad this issue couldn't be fixed upstream. Thanks |
@noonsleeper am i missing something or does that (at least for the python interpreter) only work without Also, it's not entirely clear to me from the FAQ what that actually does - i would have expected that no spawn at all would be possible without access to the Flatpak bus? Other than that the workaround seems to work (tested for system python and system black). It's a real shame Microsoft doesn't consider Flatpak relevant enough 🤦♂️ |
@Altonss please create a new ticket. |
Hi
I'm trying the flathub version of Vscodium with the ms-python.python extension and I'm experiencing problem while selecting my python interpreter.
I created the my virtual environment in a
.venv
directory, but when I tell vscodium to use this venv as python interpreter either using the command palette to select it or by directly setting"python.pythonPath": ".venv/bin/python"
, I get no error, but it does not seem to work since I get popup messages telling me it cannot find my formatter (which is properly installed in my venv, I checked in command line).Since I had to tweak the vscodium shell setting to properly use my ZSH shell as documented with:
I'm wondering if there is not a sandbox issue here you could help me to fix?
I tried to use
"python.pythonPath": "flatpak-spawn --host .venv/bin/python"
as it works in the embedded vscodium shell, but the extension does not like it.Steps to reproduce:
python3 -m virtualenv venv source venv/bin/activate pip install black
venv/bin/python
as interpreterThanks for any help on this ;)
The text was updated successfully, but these errors were encountered: