I think IntelliSens (Autocomplete) is the best editor these days. Not only does it save you the trouble of typing, but it also gives you the form of arguments, and it also has a little documentation, so it's very effective.
But I'm developing Python using VS Code and it's huge like opencv-python
,
numpy, ``` scipy```,
pandas
IntelliSense did not appear in the library, so I made a note of how to check and fix it. However, I didn't have much information, so I don't know if this will solve everyone ()
** I'm installing Python directly, not via Anaconda. ** **
settings.json
pip install [package name]
Just add the folder where the package will be installed to `'' python.autoComplete.extraPaths"
in VSCode
`settings.json```.
For example, if you installed Python 3.8 series with the default settings of the installer, it will be in the following folder (probably). If your Python version is 3.7, just replace `Python38``` with
`Python37```.
-- C: \ Users \ <user name> \ AppData \ Roaming \ Python \ Python38 \ site-packages
-- C: \ Users \ <user name> \ AppData \ Local \ Programs \ Python \ Python38 \ Lib \ site-packages
Just add this.
However, if you are developing in only one environment and you do not share `settings.json``` with other environments, you can write it as it is, for example [Settings Sync](https: / When sharing using /marketplace.visualstudio.com/items?itemName=Shan.code-settings-sync) etc.,
<username>
`` is not always the same, so it is environment-independent. To do.
settings.in json[It ’s like an environment variable](https://code.visualstudio.com/docs/editor/variables-reference)Cannotbeused,sosettings.json(Itisinthefollowinglocation)I specified the above directory with a relative path from.
--``` C: \ Users \ <user name> \ AppData \ Roaming \ Code \ User \ settings.json```
It will be as follows. It's roundabout, so please tell me if there is another good way.
#### **`settings.json`**
```json
...
"python.autoComplete.extraPaths":[
"../../Python/Python38/site-packages",
"../../../Local/Programs/Python/Python38/Lib/site-packages"
],
...
After that, if you restart VS Code, you can use IntelliSense. By the way, I think that unresolved import'~~~' Python (unresolved-import) `` `in place of
import``` is also gone.
`" python.jediEnabled "``` to
`false```It may depend on the person, but I think that `" python.jediEnabled "``` of
settings.json``` is ``` True```, so I call this ``
False` You may have to set it to ``.
settings.json
...
"python.jediEnabled": false,
...
If you install Python in any environment such as C: \ Python
or a place that does not depend on the user name, you do not have to write it with a relative path.
\In my environment installed on Python, I could write the following form.
#### **`settings.json`**
```json
...
"python.autoComplete.extraPaths":[
"C:\\Python\\Python38\\Lib\\site-packages"
],
...
Recommended Posts