Essay] VS2017 support for python

Let’s talk for a while, I hate installing redundant IDEs (if it weren’t for the Java company and Microsoft being deadly enemies, I really hope VS can support java...), Bi She deliberately wanted to learn the very popular python, so I started to try using VS Get python.

First open the vs installer, click Modify


Check the python basic support (basic support tools + python environment, only a few hundred M... if it is too large, I will not install it)

ps: At this time, python3.6.4 came out early, and the VS comes with 3.6.3, and in these environments, the C drive is installed by default...

Well, in fact, you can also customize the environment inside, not to install the environment that comes with it, then you can customize the directory and lock your own directory.

ps my default py environment path: C:\Program Files (x86)\Microsoft Visual Studio\Shared\Python36_64


(No wonder I installed vs, the C drive has shrunk by at least 5G...)


Next, Chuangjie Engineering Experience Experience


First of all, the font color (ah, the familiar color matching, the default directly becomes the color matching of my C language . This is my favorite point)

The level of support for comments (some parts do not change color, but they are indeed commented out ...)


Then there is the association (some attributes are changed, some attributes are not, but the attributes that do not have can be associated and then it is cheap... the most annoying point)


ps: It feels like those fixed associative words (the support of custom variables is good), whether it is suitable or not, it will be shown to you...


custom environment

The following is an example of changing to the ironpython environment


Right-click the project to view all python environments↑


↑Click to open this product (remember to scroll down the scroll wheel, it took me a few minutes to find this "+custom"), then click "+custom"



Everyone, follow the gourd and draw the scoop. After setting the "prefix path", click the automatic detection to the right to save some trouble.


No change, don't panic, right click on the project, click add delete python


Check it (multi-version python recommends writing projects separately in a solution...because I'm not free to switch language versions based on scripts...)


For pip, vs directly has the installation part! (very handy feature)

In vs, you can see your package directly without pip install on the command line, and right-click to search and install the package you want

Click on the environment, right-click one of the environments (my project is the 3.6 environment, click to see the existing packages [ps, in fact, they are all in Lib\site-packages in the locale directory of the package], right-click to open Install the python package to search and install the package you want)


↓If there is no pip, it will have the option to let you download directly. Of course, all other packages that can be installed will be grayed out


Search and press Enter to install, click the fork on the right side of the installed package to uninstall the package

Here's what the install shows:

In addition, click to open the interactive window in the environment to directly interactively program below (the most commonly used one)

     


Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324607735&siteId=291194637