Run the intellisense of your own python library with VScode.

Overview

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.

manner

Build, install in libraries

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 the location of python

Find out where the python you are running is. It's the which command.

which python

Find out the location of site-packages

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.

Edit VScode settings.json

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

Run the intellisense of your own python library with VScode.
Publish your own Python library with Homebrew
Flow of creating your own package with setup.py with python
Let's call your own C ++ library with Python (Preferences)
Until you can install your own Python library with pip
[Reinforcement learning] DQN with your own library
Check the existence of the file with python
[Python] Register your own library on PyPI
Until you install your own Python library
python> print> Redirected only at the end of processing?> Run with -u
Prepare the execution environment of Python3 with Docker
[Note] Export the html of the site with python.
Calculate the total number of combinations with python
Check the date of the flag duty with Python
Make your own module quickly with setuptools (python)
Manage AWS nicely with the Python library Boto
Convert the character code of the file with Python3
Analyze the source code of your own simple search engine written in Python with the code visualization tool "SOURCE TRAIL"
[Python] Determine the type of iris with SVM
Steps to install your own library with pip
The road to updating Splunkbase with your own Splunk app for Python v2 / v3
Run Python with VBA
Run prepDE.py with python3
the zen of Python
Run Blender with python
Run iperf with python
Extract the table of image files with OneDrive & Python
Memo to create your own Box with Pepper's Python
Call your own C library with Go using cgo
Learn Nim with Python (from the beginning of the year).
Destroy the intermediate expression of the sweep method with Python
Visualize the range of interpolation and extrapolation with python
Define your own distance function with k-means of scikit-learn
Calculate the regression coefficient of simple regression analysis with python
Use the CASA Toolkit in your own Python environment
[Python] Get the list of ExifTags names of Pillow library
Summary of the basic flow of machine learning with Python
Call your own python module from the ROS package
Get the operation status of JR West with Python
[Introduction to Python] Basic usage of the library matplotlib
Extract the band information of raster data with python
I tried to find the entropy of the image with python
Try scraping the data of COVID-19 in Tokyo with Python
I tried "gamma correction" of the image with Python + OpenCV
Run python with PyCharm (Windows)
Towards the retirement of Python2
I tried using the Python library from Ruby with PyCall
Recommendation of binpacking library of python
Visualize the results of decision trees performed with Python scikit-learn
Run Python with CloudFlash (arm926ej-s)
Let's run Excel with Python
Try sorting your own objects with priority queue in Python
I wrote the basic grammar of Python with Jupyter Lab
Tank game made with python About the behavior of tanks
About the ease of Python
Your URL didn't respond with the value of the challenge parameter.
I evaluated the strategy of stock system trading with Python.
What you can do with the Python standard library statistics
Check the scope of local variables with the Python locals function.
Let's touch the API of Netatmo Weather Station with Python. #Python #Netatmo
Settings to debug the contents of the library with VS Code