asdf-community / asdf-community/asdf-python

Can't use globally installed tools in project with local python version (Black tool)

Aperta
#109 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Shell
Stelle
729
Fork
65
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

I have two python versions installed via asdf:
- 3.9.6
- 3.8.11

I use `3.9.6` as a global version, and for my python project I set up a local version to `3.8.11`.
I have installed `Black` tool globally to integrate it with my IDE. I specify the full path to Black executable in PyCharm External Tools settings. It works everywhere except my project folder. I see the following output:

```shell
/home/user/.asdf/shims/black /home/user/repos/myproject/foo.py
grep: python 3.9.6
python system: No such file or directory
No preset version installed for command black
Please install a version by running one of the following:

asdf install python 3.8.11

or add one of the following versions in your config file at /home/user/repos/myproject/.tool-versions
python 3.9.6
```

My `.tool-versions` inside the project looks like this:
```plain
python 3.8.11
```

If I change it to 3.9.6 the Black tool is starting to work properly. But I do not want to fix it like this, I want to use python 3.8.11 with my project, and want to use Black as an external tool. Also, I tried to run `asdf reshim python` it doesn't fix problem too.

Could you help me with how to fix this problem?

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Direzione di ricerca

Riproduci il comando `/home/user/.asdf/shims/black` all'interno del progetto e confrontalo con il caso della versione globale. Leggi il file `.tool-versions` del progetto e analizza il comportamento di `asdf reshim python` e dell'invocazione di PyCharm External Tools. Il lavoro è completato quando Black viene eseguito dal progetto mentre localmente rimane selezionato Python 3.8.11.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
python, shell
Ambito
tooling
Tipo di issue
Bug
Difficoltà
4/5
Tempo stimato
3-5 giorni
Stato di attività
Ferma
Chiarezza
Da chiarire
Idoneità per principianti
25/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.