- Visual Studio Python IntelliSense has been refactored into a separate plugin for Visual Studio Code that provides all the information so the editor can do tooltips and completions, locate definitions and references, and rename global variables.
- Visual Studio Code is a free and lightweight program editor from Microsoft. It’s available for a wide range of operating systems, including Windows, Mac, and Linux.
- Programming With Microsoft Visual Basic 2017
- Microsoft Visual Studio Community
- Microsoft Visual Studio Download
Anaconda, the most popular Python data science platform, provides 6 million users with a streamlined Python environment on Windows, Mac or Linux. And starting today, Visual Studio Code, Microsoft’s free and cross-platform code editor, is included in the Anaconda distribution!
-->To install Python support for Visual Studio (also known as Python Tools for Visual Studio or PTVS), follow the instructions in the section that matches your version of Visual Studio:
To quickly test Python support after following the installation steps, open the Python Interactive window by pressing Alt+I and entering
2+2
. If you don't see the output of 4
, recheck your steps.Tip
The Python workload includes the helpful Cookiecutter extension that provides a graphical user interface to discover templates, input template options, and create projects and files. For details, see Use Cookiecutter.
Note
Python support is not presently available in Visual Studio for Mac, but is available on Mac and Linux through Visual Studio Code. See questions and answers. https://bjever449.weebly.com/blog/corel-video-studio-x8-download-for-mac.
Visual Studio 2019 and Visual Studio 2017
- Download and run the latest Visual Studio installer. If you have Visual Studio installed already, run the Visual Studio Installer, select the Modify option (see Modify Visual Studio) and go to step 2.TipThe Community edition is for individual developers, classroom learning, academic research, and open source development. For other uses, install Visual Studio 2019 Professional or Visual Studio 2019 Enterprise.
- The installer presents you with a list of workloads, which are groups of related options for specific development areas. For Python, select the Python development workload.Optional: if you're working with data science, also consider the Data science and analytical applications workload. This workload includes support for the Python, R, and F# languages. For more information, see Data science and analytical applications workload.NoteThe Python and Data Science workloads are available only with Visual Studio 2017 version 15.2 and later.Optional: if you're working with data science, also consider the Data science and analytical applications Get the sdk android studio for mac. workload. This workload includes support for the Python and F# languages. For more information, see Data science and analytical applications workload.
- On the right side of the installer, chose additional options if desired. Skip this step to accept the default options.
Option Description Python distributions Choose any combination of the available options, such as 32-bit and 64-bit variants of the Python 2, Python 3, Miniconda, Anaconda2, and Anaconda3 distributions that you plan to work with. Each includes the distribution's interpreter, runtime, and libraries. Anaconda, specifically, is an open data science platform that includes a wide range of pre-installed packages. (You can return to the Visual Studio installer at any time to add or remove distributions.) Note: If you've installed a distribution outside of the Visual Studio installer, there's no need to check the equivalent option here. Visual Studio automatically detects existing Python installations. See The Python Environments window. Also, if a newer version of Python is available than what's shown in the installer, you can install that version separately and Visual Studio will detect it. Cookiecutter template support Installs the Cookiecutter graphical UI to discover templates, input template options, and create projects and files. See Use the Cookiecutter extension. Python web support Installs tools for web development including HTML, CSS, and JavaScript editing support, along with templates for projects using the Bottle, Flask, and Django frameworks. See Python web project templates. Python IoT support Supports Windows IoT Core development using Python. Python native development tools Installs the C++ compiler and other necessary components to develop native extensions for Python. See Create a C++ extension for Python. Also install the Desktop development with C++ workload for full C++ support. Azure Cloud Services core tools Provides additional support for developer Azure Cloud Services in Python. See Azure cloud service projects. Option Description Python distributions Choose any combination of the available options, such as 32-bit and 64-bit variants of the Python 2, Python 3, Miniconda, Anaconda2, and Anaconda3 distributions that you plan to work with. Each includes the distribution's interpreter, runtime, and libraries. Anaconda, specifically, is an open data science platform that includes a wide range of pre-installed packages. (You can return to the Visual Studio installer at any time to add or remove distributions.) Note: If you've installed a distribution outside of the Visual Studio installer, there's no need to check the equivalent option here. Visual Studio automatically detects existing Python installations. See The Python Environments window. Also, if a newer version of Python is available than what's shown in the installer, you can install that version separately and Visual Studio will detect it. Cookiecutter template support Installs the Cookiecutter graphical UI to discover templates, input template options, and create projects and files. See Use the Cookiecutter extension. Python web support Installs tools for web development including HTML, CSS, and JavaScript editing support, along with templates for projects using the Bottle, Flask, and Django frameworks. See Python web project templates. Python native development tools Installs the C++ compiler and other necessary components to develop native extensions for Python. See Create a C++ extension for Python. Also install the Desktop development with C++ workload for full C++ support. Azure Cloud Services core tools Provides additional support for developer Azure Cloud Services in Python. See Azure cloud service projects. - After installation, the installer provides options to modify, launch, repair, or uninstall Visual Studio. The Modify button changes to Update when updates to Visual Studio are available for any installed components. (The Modify option is then available on the drop-down menu.) You can also launch Visual Studio and the installer from the Windows Start menu by searching on 'Visual Studio'.
Troubleshooting
If you encounter problems installing or running Python in Visual Studio, try the following:
- Determine whether the same error occurs using the Python CLI, that is, running python.exe from a command prompt.
- Use the Repair option in the Visual Studio installer.
- Repair or reinstall Python through Settings > Apps & features in Windows.
Example error: Failed to start interactive process: System.ComponentModel.Win32Exception (0x80004005): Unknown error (0xc0000135) at Microsoft.PythonTools.Repl.PythonInteractiveEvaluator.d__43.MoveNext().
Visual Studio 2015
- Run the Visual Studio installer through Control Panel > Programs and Features, selecting Microsoft Visual Studio 2015 and then Change.
- In the installer, select Modify.
- Select Programming Languages > Python Tools for Visual Studio and then Next:
- Once Visual Studio setup is complete, install a Python interpreter of your choice. Visual Studio 2015 supports only Python 3.5 and earlier; later versions generate a message like Unsupported Python version 3.6). If you already have an interpreter installed and Visual Studio doesn't detect it automatically, see Manually identify an existing environment.
Visual Studio 2013 and earlier
- Install the appropriate version of Python Tools for Visual Studio for your version of Visual Studio:
- Visual Studio 2013: PTVS 2.2 for Visual Studio 2013. The File > New Project dialog in Visual Studio 2013 gives you a shortcut for this process.
- Visual Studio 2012: PTVS 2.1 for Visual Studio 2012
- Visual Studio 2010: PTVS 2.1 for Visual Studio 2010
- Install a Python interpreter of your choice. If you already have an interpreter installed and Visual Studio doesn't detect it automatically, see Manually identify an existing environment.
Install locations
By default, Python support is installed for all users on a computer.
![Code Code](/uploads/1/3/3/2/133273925/100140695.png)
For Visual Studio 2019 and Visual Studio 2017, the Python workload is installed in %ProgramFiles(x86)%Microsoft Visual Studio<VS_version><VS_edition>Common7IDEExtensionsMicrosoftPython where <VS_version> is 2019 or 2017 and <VS_edition> is Community, Professional, or Enterprise.
For Visual Studio 2015 and earlier, installation paths are as follows:
- 32-bit:
- Path: %Program Files(x86)%Microsoft Visual Studio <VS_ver>Common7IDEExtensionsMicrosoftPython Tools for Visual Studio<PTVS_ver>
- Registry location of path: HKEY_LOCAL_MACHINESoftwareMicrosoftPythonTools<VS_ver>InstallDir
- 64-bit:
- Path: %Program Files%Microsoft Visual Studio <VS_ver>Common7IDEExtensionsMicrosoftPython Tools for Visual Studio<PTVS_ver>
- Registry location of path: HKEY_LOCAL_MACHINESoftwareWow6432NodeMicrosoftPythonTools<VS_ver>InstallDir
where:
- <VS_ver> is:
- 14.0 for Visual Studio 2015
- 12.0 for Visual Studio 2013
- 11.0 for Visual Studio 2012
- 10.0 for Visual Studio 2010
- <PTVS_ver> is a version number, such as 2.2, 2.1, 2.0, 1.5, 1.1, or 1.0.
User-specific installations (1.5 and earlier)
Python Tools for Visual Studio 1.5 and earlier allowed installation for the current user only, in which case the installation path is %LocalAppData%MicrosoftVisualStudio<VS_ver>ExtensionsMicrosoftPython Tools for Visual Studio<PTVS_ver> where <VS_ver> and <PTVS_ver> are the same as described above.
The most important thing to say is that this is not Visual Studio - not even close - despite the name that attempts to make the connection. This is a brand new cross platform IDE - the real question is why?
Microsoft already has more IDEs than it really needs. There is the excellent Visual Studio - the flagship; then there is Blend, a designer- oriented IDE; and there is WebMatrix 3, which covers some of the same ground as the new Visual Studio Code, but only under Windows.
At the moment the most important thing to say about the latest addition is that it fairly underwhelming. It might be a useful IDE in a few releases time, but at the moment it is just a start on an IDE.
What has made it possible is the work that the .NET languages team did to move from the old compiler infrastructure to the new Roslyn compiler. The entire IDE can be thought of as a locally hosted web app.
'Architecturally, Visual Studio Code combines the best of web, native, and language-specific technologies. Using the GitHub Electron Shell, Code combines web technologies such as JavaScript and Node.js with the speed and flexibility of native apps. Code uses a newer, faster version of the same industrial-strength HTML-based editor that has powered the “Monaco” cloud editor, Internet Explorer's F12 Tools, and other projects.'
The presentation layer is implemented by a customized Google Chrome rendering engine.
Take a look at the video to discover how Microsoft presents VSCode:
What is difficult to find out is exactly what sorts of projects VSCode supports. If you define supports as offering IntelliSense prompting then the list is quite short:
JavaScript, JSON, HTML, CSS, LESS, SASS
If you relax the requirements to syntax coloring then you get:
C++, jade, PHP, Python, XML, Batch, F#, DockerFile, Coffee Script, Java, HandleBars, R, Objective-C, PowerShell, Lua, Visual Basic, Markdown
In fact there are only two languages that get full support and these are C# and TypeScript/Node.js. The target project types are ASP.NET 5 and Node.js.
In fact if you take it down to what types of project can you debug on all platforms then the answer is just Node.js.
Out of the box Code doesn't actually create any projects for you. Projects are defined as what is found in a folder and the project structure is defined by either a suitable json file or an ASP.NET5 solution/project files.
Programming With Microsoft Visual Basic 2017
How are you supposed to create a project?
You could use the full Visual Studio to create a project structure and then simply load this into VSCode but this seems self defeating.
The suggested solution is to use Express to generate Node.js projects and yeoman for ASP.NET5. You have to download, install and run these separately. Not a huge problem but I thought IDE stood for INTEGRATED Development Environment. In fact once you start to look at how you might use VSCode you discover that it is not so much an Integrated Development Environment but a selection of tools flying in close formation. The list of additional tools reads like a whos who of FOSS tools - git, Express, gulp, mocha, bower etc. You care supposed to be install and master what ever of these you need to use.
This approach may well appeal to the existing FOSS user, but on the other hand VSCode being from Microsoft isn't likely to appeal much to this audience. What the existing, pampered, Visual Studio user will make of this mess of tools is fairly clear - and this is what makes the use of the name 'Visual Studio' misleading in the extreme.
To add to the injury, if you actually want to run the program you have developed you first have to set up a launch configuration. Also note that, at the moment, debugging of ASP.NET5 isnt' supported on OSX and Linux. So it's not that cross platform at the moment and certainly not a cross platform IDE, more of a cross platform editor with some syntax highlighting/prompting. You can fairly easily debug Node.js applications, but as Node.js is already cross platform, this is hardly an achievement.
I can't see very many programmers rushing to use VSCode as its only real advantage is IntelliSense prompting for JavaScript. What is really important about VSCode, and the reason for the many headlines proclaiming 'Visual Studio Comes to Linux and Mac', which is clearly nonsense, is (to misquote Samuel Johnson):
'Sir, Microsoft doing cross platform is like a dog walking on his hind legs. It is not done well; but you are surprised to find it done at all'
VSCode is the result of a number of deep changes in Microsoft - the creation of the Roslyn compiler, the focus on Cloud services, and the willingness to use and support open source coded.
Microsoft Visual Studio Community
It will be interesting to see what happens to VSCode in the future, but for now it is a curiosity best left to programmers with time to spare.
More Information
Related Articles
To be informed about new articles on I Programmer, install the I Programmer Toolbar, subscribe to the RSS feed, follow us on, Twitter,Facebook, Google+ or Linkedin, or sign up for our weekly newsletter.
Scratch 3 Desktop for Raspbian on Raspberry Pi Released 19/08/2019 The Raspberry Pi Foundation has released an offline implementation of Scratch 3.0 than runs under Raspbian Buster and performs best on the 2GB Raspberry Pi 4. |
Git Adds Switch And Restore 21/08/2019 The latest version of Git, the distributed version control system, has been released with around 500 changes, including two new sub-commands that are designed to provide an experimental alternative to [ .. ] |
More News |
Microsoft Visual Studio Download
Comments
or email your comment to: [email protected]