4

I am trying to activate cpplint within vs code. I have installed it in Anacanda environment where executable

/home/ubuntu/anaconda3/bin/cpplint

I have a link to it

ls -l /home/ubuntu/anaconda3/bin/cpplint

Unfortunately per visual code cpplint extension still getting error of "Cpplint could not find executable"

Please, advice to configure it correctly.

tkruse
  • 10,222
  • 7
  • 53
  • 80
user3428154
  • 1,174
  • 5
  • 18
  • 38

1 Answers1

1

Download and install

sudo apt-get install python-pip pip install --user cpplint

Verify install result

ls -l /usr/local/bin/cpplint

If you still have issues check cpplint.cpplintPath and verify the execution path is set correctly.

Also, if you installed cpplint into ~/.local/ directories, by default ~/.local/bin is not included in PATH. So to fix just that add:

export PATH=$PATH:~/.local/bin/ to your ~/.bashrc

vvvv4d
  • 3,881
  • 1
  • 14
  • 18
  • Strangely, my vscode cpplint plugin cannot find even when it is in PATH. If I open a terminal inside vscode it finds "cpplint", but complains anyway. My solution was to add this to user settings `Ctrl+Shift+P` `Preferences: Open Settings (JSON)` and put this line: `"cpplint.cpplintPath": "/home/your_username/.local/bin/cpplint",`. Note that I'm using cpplint plugin `mine.cpplint` (I guess it's the "official"). – igormcoelho Jul 26 '21 at 18:14
  • @igormcoelho I *think* there may be a bug in this plugin where it searches for the executable on the local machine, not the remote when it shows that error. – Bklyn Sep 10 '21 at 20:15