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.

1

1 Answer 1

3

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.

Sign up to request clarification or add additional context in comments.

2 Comments

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 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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.