Adding libraries from PYTHONPATH to the Kite index
How do I add libraries to the Kite index?
We added a new feature that allows Kite users to create symbolic links within the
/.kite/libraries/ directory that point to the
site-packages folder typically found under your Python installation (or any folder you store libraries).
(e.g. libraries in
PYTHONPATH, so that Kite provides autocomplete and documentation for these additional libraries)
To create the symbolic link, first make the
/libraries directory in the
.kite directory if it's not already there:
Mac and Linux -
mkdir -p ~/.kite/libraries/
Next, create a symbolic link to the
site-packages folder you want indexed by Kite:
Mac and Linux -
ln -s my_env/site-packages/ ~/.kite/libraries/
mklink /D C:\Users\USERNAME\AppData\Local\Kite\libraries my_env\site-packages
Finally, check the link is there:
cd .kite/ ls libraries/site-packages/
Kite will then be able to index the libraries in that symbolically linked folder, and will include them in its recurring index build process. It may take a restart of Kite at the moment, which is a known issue that we're working on.
Contact us at firstname.lastname@example.org if you have further questions. We'll continue improving this feature, so please send feedback to email@example.com.
Why can't Kite find libraries located in my PYTHONPATH?
Given privacy concerns of users, we built Kite to be cautious in its search for libraries. This means Kite explicitly avoids searching through the following directories:
- Windows directories that contain
- Linux directories that are hidden (e.g. contain
/.), and the directories starting with the following:
- MacOS directories that start with the following:
/sbin. All Applications, Calendar, Library, Pictures, and Trash directories are excluded as well.
It could be the case that your
PYTHONPATH is set to a location Kite does not walk to find libraries. (If not the case, please let us know so we can debug/ further clarify: firstname.lastname@example.org)
For example, this location would require a symbolic link for Kite to index it: