1

I have compiled some python libraries (C++ bindings to python). I am using them with setting the environment variable PYTHONPATH My question is, how can I make them available to visual studio code? so that I can get code completion and so on.

Acki
  • 21
  • 1
  • 3
  • Does this answer your question? [Visual Studio How to add Python module to Intellisense](https://stackoverflow.com/questions/30605416/visual-studio-how-to-add-python-module-to-intellisense) – miken32 Jul 26 '22 at 15:51

1 Answers1

2

There is a section in the documentation of vscode, where you can find a section to set up python.autoComplete.extraPaths in your settings.json.

Please read the troubleshooting section in the documentation to get IntelliSense for a custom module.

Be aware of the different settings between the operating systems. And point the extraPaths to your custom module.

Max
  • 1,203
  • 1
  • 14
  • 28
  • I did it, but no luck. I guess in order to load the libraries correctly `LD_LIBRARY_PATH` needs to be adjusted too. My python libs has dependency to some other libs, which I placed in the same directory. Do you know what I can do here? – Acki Sep 19 '19 at 09:04
  • @Acki your question is very broad, please provide some steps you have tried to achieve the code completion. I would suggest, that all custom library-paths are in your settings.json file but I need more information to help you! And please consider reading the documentation I linked in the answer. – Max Sep 19 '19 at 12:48