Closed jrom99 closed 3 months ago
Hmm interesting. Can you try and select a different python version (e.g. 3.11) from the python selector to see if that helps to resolve the issue?
Clicking on the 3.11.8 (that's probably 3.1 in your case) button in the status bar should open a popup that allows you to select the Python version.
Changing python's version works, but I still needed to work with this environment, which always shows "3.1.x". At the end I used an external terminal with ruff check --watch .
and deleted the environment as soon as I was done.
I understand. I suspect that that environment is indeed Python 3.1
which we don't support. Can you try to run
[USER]/.local/share/conda/envs/[ENV]/bin/python -V
I'm not sure what [USER]
and [ENV]
means. You might need to replace those variables with something useful.
The strange thing is that the environment is actually python3.11, it runs as expected and uses the features available for it, such as type hints. [USER]
and [ENV]
were just placeholders for the actual directories names. I'll recreate the environment and try again.
Do other Python extensions work as expected in that environment (e.g., Black, or isort, or anything else that's published by Microsoft)?
Good news, after I ran conda clean --all
the environment is now displayed correctly:
Ruff is working as expected now.
That's great news. Thanks @jrom99 for getting back to us. Enjoy your weekend.
Ruff: restart server
fails when I'm using one of my conda envs.One of my environments shows as this in VSCode (I don't know why, since it's actually using Python 3.11)
My user settings:
On my
pyproject.toml
:On my
environment.yml
:System information
Version: 1.87.0 Commit: 019f4d1419fbc8219a181fab7892ebccf7ee29a2 Date: 2024-02-27T23:42:16.599Z Electron: 27.3.2 ElectronBuildId: 26836302 Chromium: 118.0.5993.159 Node.js: 18.17.1 V8: 11.8.172.18-electron.0 OS: Linux x64 6.5.0-25-generic (Ubuntu 23.10)
Ruff extension version: v2024.16.0