asdf-python
asdf-python copied to clipboard
Can't use globally installed tools in project with local python version (Black tool)
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:
/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:
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?