Method: 1. Set up a Python environment; 2. Install vs2017 software, then run Visual Studio Istaller, check "python development", configure the running environment; 3. Open VS, select the python application, and then click "Attach " button, open the IDE to write python code and run it.
#1. Building the Python environment:
Here I choose Anaconda to help us set up the python environment in a fool-proof way. Download address of Anaconda:https://www.anaconda.com/download/#download
Just choose the appropriate version to download, I The selected Python3.6 version 64-bit is installed after downloading. Anaconda will help us install the Python environment.
2. Choice of Python development in VS2017:
If you have already installed VS2017, directly find Visual Studio Installer, run and select modification, and check the python program Select
If you have not installed VS2017, you need to download the latest VS2017 from the VS official website.
3. Test environment:
After the environment is set up, you need to test whether it is set up successfully. Open VS and select the python application;
## You can see that the Python3.6 we installed has been introduced Then click the additional button: the following interface appears, which means that our VS2017 has been able to Successfully used as Python IDE.The above is the detailed content of How to write python code in vs2017. For more information, please follow other related articles on the PHP Chinese website!