godot-gdscript-toolkit icon indicating copy to clipboard operation
godot-gdscript-toolkit copied to clipboard

"GDToolkit is not installed." when trying to format file

Open PeteyPii opened this issue 3 years ago • 1 comments

A couple of days ago it was working fine and now I cannot seem to format my files. Intellisense still seems to work.

Running on Windows 10.

Output from pip3 install gdtoolkit -v

Using pip 20.2.3 from c:\users\patrick\appdata\local\programs\python\python39\lib\site-packages\pip (python 3.9)
Non-user install because site-packages writeable
Created temporary directory: C:\Users\Patrick\AppData\Local\Temp\pip-ephem-wheel-cache-jvc8rns9
Created temporary directory: C:\Users\Patrick\AppData\Local\Temp\pip-req-tracker-y69sv5xo
Initialized build tracking at C:\Users\Patrick\AppData\Local\Temp\pip-req-tracker-y69sv5xo
Created build tracker: C:\Users\Patrick\AppData\Local\Temp\pip-req-tracker-y69sv5xo
Entered build tracker: C:\Users\Patrick\AppData\Local\Temp\pip-req-tracker-y69sv5xo
Created temporary directory: C:\Users\Patrick\AppData\Local\Temp\pip-install-yvrflq7s
Requirement already satisfied: gdtoolkit in c:\users\patrick\appdata\local\programs\python\python39\lib\site-packages (3.2.7)
Requirement already satisfied: lark-parser==0.8.0 in c:\users\patrick\appdata\local\programs\python\python39\lib\site-packages (from gdtoolkit) (0.8.0)
Requirement already satisfied: docopt>=0.6.2 in c:\users\patrick\appdata\local\programs\python\python39\lib\site-packages (from gdtoolkit) (0.6.2)
Requirement already satisfied: pyyaml>=5.1 in c:\users\patrick\appdata\local\programs\python\python39\lib\site-packages (from gdtoolkit) (5.4.1)
WARNING: You are using pip version 20.2.3; however, version 21.1.2 is available.
You should consider upgrading via the 'c:\users\patrick\appdata\local\programs\python\python39\python.exe -m pip install --upgrade pip' command.
Removed build tracker: 'C:\\Users\\Patrick\\AppData\\Local\\Temp\\pip-req-tracker-y69sv5xo

Running gdformat from command line works fine.

PeteyPii avatar Jun 11 '21 02:06 PeteyPii

I meet the same problem, anyone can help? thx~

xmyhhh avatar Jun 20 '22 14:06 xmyhhh

In which context are you trying to format the file? You likely need to install it in the right virtual environment to be picked up in your editor. If you're using vscode see #177

micimize avatar Nov 04 '22 17:11 micimize

In my case, I fixed this by installing gdtoolkit using the exact same Python executable that VSCode was using.

  1. Go to Python: Select Interpreter in VSCode and take note of the path of the selected interpreter, in my case it was ~/AppData/Local/Programs/Python/Python39/python.exe
  2. Run pip install on that executable, so for me, this was ~/AppData/Local/Programs/Python/Python39/python -m pip install gdtoolkit

mstieranka avatar Nov 05 '22 08:11 mstieranka

I ran into this, turns out it was because I had the Python VSCode extension installed but disabled. Re-enabling it got things working again.

TranquilMarmot avatar Jun 01 '23 04:06 TranquilMarmot

Seems like we got at least few solutions. Therefore I'm assuming we can close this issue.

Scony avatar Jun 02 '23 08:06 Scony