When I try to write a function such as numpy or pandas, VScode teacher completes the function name and makes it crispy, isn't it? It seems that this complementary function is called `` `Intellisense```, I didn't know, (shame)
However, assuming that you made your own python library with setuptool etc. How can this get VScode to use intellisense?
Intellisense is not trained without permission.
When building a library using setup.py, how can I get my own library to be placed in the library group referenced by the python I am using? It was this command,
python setup.py install
This will put the shared object file in the build + reference.
Find out where the python you are running is. It's the which
command.
which python
Now, use this command to find out where the built library is located.
python -c "import site; print (site.getsitepackages())"
The folder name should be the path to site-packages
.
There are a lot of libraries in the path that comes out as the output of this command.
From here, open `` `settings.jsonto activate VScode intellisense. You can find out how to open it by pressing
F1and searching for
setting```.
And add this
settings.json
{
"python.autoComplete.extraPaths":[
"<Your site-Path to packages>"
],
"python.pythonPath": "<Your python path>"
}
Set this and restart VScode once.
Then ...
Intellisense will also be activated in your own library! !! !! !! !!
great,,,! !! !!
This made me comfortable.
end.
Recommended Posts