denosaurs / denosaurs/deno_python
Python packages not found if installed with venv
- Lingua principale
- TypeScript
- Stelle
- 762
- Fork
- 27
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
On mac os it works well with packages installed with `brew` but when using venv and packages installed with pip - it can't find it.
The `sys.path` is different when run with `python` and `bunpy`, the bunpy misses the venv installation dir
```
python
[
'/Users/alex/base/projects/ext_ts/math',
'/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python312.zip',
'/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12',
'/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/lib-dynload',
'/Applications/misc/python/lib/python3.12/site-packages'
]
bunpy (misses '/Applications/misc/python/lib/python3.12/site-packages' )
[
'/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python312.zip',
'/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12',
'/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/lib-dynload',
'/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages'
]
```
P.S.
I also had to explicitly set `python` lib, by default it can't find it
```
export DENO_PYTHON_PATH=/usr/local/Cellar/python@3.12/3.12.4/Frameworks/Python.framework/Versions/3.12/lib/libpython3.12.dylib
```
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
Inizia riproducendo il confronto tra gli entry point `python` e `bunpy` su macOS con una venv, registrando entrambi i valori di `sys.path` e l’effetto di `DENO_PYTHON_PATH`. Il lavoro è completato quando bunpy rileva i pacchetti installati e la libreria Python della venv senza perdere i percorsi mostrati dall’interprete normale.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- bun, deno, python
- Ambito
- developer-experience, tooling
- Tipo di issue
- Bug
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 30/100