cmake_format icon indicating copy to clipboard operation
cmake_format copied to clipboard

cmake-format is not found after installation on Windows

Open aminya opened this issue 5 years ago • 5 comments

Where is this executable?

❯ pip install cmakelang[YAML]
Requirement already satisfied: cmakelang[YAML] in c:\python39\lib\site-packages (0.6.13)
Requirement already satisfied: six>=1.13.0 in c:\python39\lib\site-packages (from cmakelang[YAML]) (1.15.0)
Requirement already satisfied: pyyaml>=5.3; extra == "yaml" in c:\python39\lib\site-packages (from cmakelang[YAML]) (5.3.1)
❯ cmake-format
cmake-format: The term 'cmake-format' is not recognized as a name of a cmdlet, function, script file, or executable program.

aminya avatar Nov 15 '20 17:11 aminya

Do you have c:\python39\Scripts in your PATH environment variable ?

rasjani avatar Nov 16 '20 14:11 rasjani

I think this will depend largely on how you have installed python (e.g. native, msys, conda, etc), but I can take a guess. As @rasjani pointed out, you might want to check in C:\python39\Scripts, or perhaps C:\python39\bin. Wherever it resides you will need to add that to the PATH environment variable in order to use the command cmake-format in the terminal.

cheshirekow avatar Nov 16 '20 16:11 cheshirekow

The executable does not exist on my computer. I searched for it in my whole drive. image

Do you have c:\python39\Scripts in your PATH environment variable ?

There is not a cmake-format executable there. This is all I have:

image

C:\python39\bin

This does not exist.

aminya avatar Nov 16 '20 17:11 aminya

I think this might be related to a bug in pip. Try the following pip uninstall cmake-format and then pip install --force-reinstall cmakelang[YAML] and see if that helps.

I don't think the executable will be called cmake-format.exe. I'm not sure what pip and setup-tools do on windows, but maybe it will be a .bat?

cheshirekow avatar Jan 14 '21 20:01 cheshirekow

Oh, Thanks! Running the commands helped!

aminya avatar Jan 14 '21 21:01 aminya