facebook / facebook/pyrefly

Support `pixi` Python environment discovery

Open
#4,432 2 comments 0 reactions 1 assignee Claimed by @WilliamK112 View on GitHub
configuration help wanted
Dominant language
Rust
Stars
7k
Forks
516
PR merge metrics
No merged PRs in 30d

Description

### Describe the Bug

Fresh installed Pyrefly, but it reports:
```
Cannot find module `torch`
Looked in these locations:
Fallback search path (guessed from importing file with heuristics): ["e:\\Sandbox\\#other models", "e:\\Sandbox", "e:\\"]
Site package path queried from interpreter: ["C:\\Program Files\\Python314\\DLLs", "C:\\Program Files\\Python314", "C:\\Users\\user\\AppData\\Roaming\\Python\\Python314\\site-packages", "C:\\Program Files\\Python314\\Lib\\site-packages", "C:\\Program Files\\Python314\\Lib\\site-packages\\win32", "C:\\Program Files\\Python314\\Lib\\site-packages\\win32\\lib", "C:\\Program Files\\Python314\\Lib\\site-packages\\Pythonwin"]Pyreflymissing-import

torch: Module[torch]
```
Image

The default Pylance has no this issue. That disabling Pylance didn't help.

pixi is a replacement of conda, and much faster than conda, which is very slow that costs minutes to init before add a package.
pixi has the trend override conda, because of speed, pyrefly should support pixi fast too.

Related: https://github.com/facebook/pyrefly/issues/166 which only supported `Venv` and `Conda`.

Additional:
It seems this extension overwrite the language server of vscode even the selected it as Pylance, why dont make a option in vscode so users can switch it just like switch to `Jedi` and `None` already in it?

### Sandbox Link

_No response_

### (Only applicable for extension issues) IDE Information

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.