asottile / babi

a text editor
MIT License
396 stars 46 forks source link

babi not using babi_grammars when installed in a venv #287

Closed MohrJonas closed 1 year ago

MohrJonas commented 1 year ago

I have babi installed in a venv (in my case located in ~/babi/venv). The problem is that syntax highlighting is not working (babi_grammars is installed in ~/babi/venv/lib/python3.10/site-packages). After some digging around, it seems that the problem is that babi is looking for grammar files in venv/share/babi/grammar_v1 and ~/.local/share/babi/grammar_v1, both of which don't exist

asottile commented 1 year ago

how did you install it in a venv? can you show the file structure of your virtualenv?

MohrJonas commented 1 year ago

I installed it like that:

The reason I installed it like that instead of using the babi package is to do some development myself.

The venv looks like that: . ├── bin │   ├── activate │   ├── babi │   ├── pip │   ├── python3 -> /usr/bin/python3 │   ├── python3.10 -> python3 ├── include ├── lib │   └── python3.10 │   └── site-packages │ └── babi_grammars-0.0.50-py3.10.egg │ ├── babi-1.5.3-py3.10.egg ├── lib64 -> lib └── pyvenv.cfg

(Some files omitted for readability)

asottile commented 1 year ago

python setup.py install is not how to install packages -- use pip