Previously, I wrote Qiita called Preparing an HTML creation environment using Visual Studio Code, but nowadays machine learning (including deep learning) is popular. Many books based on Python have been published (Amazon: Python Machine Learning Programming, [Amazon: Deep Learning from Zero-Deep Learning Learned with Python] Theory and implementation of](http://amzn.to/2n7hVb7), etc.). So this time I decided to prepare a Python development environment with Visual Studio Code.
The target version of Visual Studio Code is ** 1.10.2 **. The Python version is ** 3.6.0 **.
Use the package manager chocolatey. If chocolatey is not installed, install it with the following command.
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
The installation will be completed immediately. Relaunch the command prompt and install python with the choco command.
choco install python
The following add-ins for Python extensions have all the functionality needed for coding (debugging, intellisense, etc.).
Plugin | Name and link | Use |
---|---|---|
Python | Linting,Debugging(multi-threaded,remote), Intellisense, code formatting, refactoring, unit tests, snippets, and more. |
Open the command palette with Ctrl + P in Visual Studio Code and execute the following command.
ext install Python
Select "Python" from the Extensions pane and click "Install".
Visual Studio Code seems to support multiple Lint tools, but this time I will install PyLint. (It seems to be standard Lint → DonJayamanne / pythonVSCode Linting Execute the following at the command prompt.
pip install pylint
Go back to Visual Studio Code and check if the settings to use pylint (File-> Basic settings-> Settings) are made.
settings.json
// Whether to lint Python files.
"python.linting.enabled": true,
// Whether to lint Python files using pylint.
"python.linting.pylintEnabled": true,
This completes the setup. I didn't get caught in particular.
Recommended Posts