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.
-
Does this answer your question? Visual Studio How to add Python module to Intellisensemiken32– miken322022-07-26 15:51:27 +00:00Commented Jul 26, 2022 at 15:51
Add a comment
|
1 Answer
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.
2 Comments
Acki
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?Max
@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.