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
python -m ruff can't find ruff.exe on Windows when using a virtual environment generated using --system-site-packages:
Prerequisite: have ruff installed system-wide on Windows. The bug does not trigger if it is installed in the per-user packages in AppData. Example: I have a Python311 installed in C:\Python311, with ruff at C:\Python311\Lib\site-packages\ruff\__main__.py and C:\Python311\Scripts\ruff.exe.
Create virtual environment using --system-site-packages flag
Using virtual environment to run python -m ruff results in FileNotFoundError.
.\myvenv\Scripts\python -m ruff
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "C:\Python311\Lib\site-packages\ruff\__main__.py", line 40, in <module>
ruff = os.fsdecode(find_ruff_bin())
^^^^^^^^^^^^^^^
File "C:\Python311\Lib\site-packages\ruff\__main__.py", line 36, in find_ruff_bin
raise FileNotFoundError(scripts_path)
FileNotFoundError: C:\[...]\myvenv\Scripts\ruff.exe
Ruff version: 0.6.2
The text was updated successfully, but these errors were encountered:
python -m ruff
can't find ruff.exe on Windows when using a virtual environment generated using--system-site-packages
:Prerequisite: have ruff installed system-wide on Windows. The bug does not trigger if it is installed in the per-user packages in AppData.
Example: I have a Python311 installed in
C:\Python311
, with ruff atC:\Python311\Lib\site-packages\ruff\__main__.py
andC:\Python311\Scripts\ruff.exe
.Create virtual environment using
--system-site-packages
flagUsing virtual environment to run
python -m ruff
results in FileNotFoundError..\myvenv\Scripts\python -m ruff
Ruff version: 0.6.2
The text was updated successfully, but these errors were encountered: