Closed SUPERustam closed 3 weeks ago
Hi! ruff-lsp
requires Python to be installed on your system. You'll need to configure VSCode to use a Python interpreter as described in the error message.
I'm not sure why it's not finding the Python installation you have. Could you share more details about where your Python is installed? i.e.which python
? What happens if you configure it directly?
~Alternatively, our new server does not require a Python interpreter.~ @charliermarsh has pointed out this isn't true until #479
I already have Python on my machine, these my python interpreters:
/usr/bin/python3 (3.9)
/opt/homebrew/bin/python3 (3.12.3)
I have ~/.vscode/extensions/ms-python.python-2024.8.0
, but it doesn't work and I don't know where to find the right ms-python.python
(it's weird because I am on Mac not on Windows)&
I don't change any settings of ruff
extenstion. This's my default package.json in ~/.vscode/extensions/charliermarsh.ruff-2024.26.0-darwin-arm64
package.json
Previously, before latests updates of extension (or vscode? ) all my ruff staff work fine on this machine. I don't even change settings of vscode-ruff, all work perfectly fine out of the box.
To clarify, I believe ms-python.python
is the VS Code Python extension, not Python itself. So it's required regardless of operating system.
I'm just looking through the history to see if we changed anything related to this and I'm not seeing anything relevant.
Do you have a Python interpreter configured in the VS Code window? E.g., in the bottom right here?
Thank you, @charliermarsh and @zanieb!!! Yes, VS Code didn't recognize my interpreter, but after setting it, everything immediately started working fine.
I installed latest version of python, vs code and ruff (also ruff-lsp in my .env), but get error and can't format code in jupyter files/python files.![image](https://github.com/astral-sh/ruff-vscode/assets/64551202/be23eb05-360c-4498-9e88-da5c4643be98)
My system: