본문 바로가기

카테고리 없음

Python Visual Studio For Mac



・Python Django入門 (2) Mac編. Python Path and Version pythonVSCode some virtualenv issues #148 Troubleshooting Intellisense Autocompletion. 7.Visual Studio Codeのインストール.

  • Trying to figure out Python with Visual Studio on Mac. Dependencies and Libraries don't seem to install/launch correctly. For example, I have pandas on my system, installed via pip, and if I do.
  • For Visual Studio to become the goto dev tool on Mac, adding Python support would go a long way to make that happen. RM commented October 7, 2018 2:59 AM Flag as inappropriate Flag as inappropriate Delete.
See how Microsoft is making our platform better for Python developers
Python Blog

Visual Studio Code

Free, lightweight editor for macOS, Linux, and Windows, with Python support.

Azure for Python developers

Build and deploy your Python apps in the cloud—and go further with AI and Machine Learning.

Azure Pipelines for Python

Run CI/CD for your Python apps, with support for Linux, macOS and Windows. Free for individuals, small teams, and open source projects.

Read the Docs

Learn how to build Python apps and deploy them to the cloud.

Remote Python Development in Visual Studio Code

Today at PyCon 2019, Microsoft’s Python and Visual Studio Code team announced remote development in Visual Studio Code, enabling Visual Studio Code developers to work in development setups where their code and tools are running remotely inside of docker containers, remote SSH hosts, and Windows Subsystem for Linux (WSL), while you still get a rich and seamless user experience locally.
Read more

Come meet Microsoft at PyCon 2019!

Next week we (the Python team here at Microsoft) will be at the PyCon conference in Cleveland, OH on May 1-9, and are looking forward to meeting you! We are excited to support this event as Keystone sponsors of PyCon for the third time, and we will be participating in all aspects of the conference. Come join our workshops, then stop by our booth to get some great swag and check out the latest in Visual Studio Code, Azure, Azure Pipelines, and Python on Windows. Lastly, come work alongside our team at the developer sprints!
Read more

Visual Studio For Mac

Python in Visual Studio Code – April 2019 Release

We are pleased to announce that the April 2019 release of the Python Extension for Visual Studio Code is now available. You can download the Python extension from the Marketplace, or install it directly from the extension gallery in Visual Studio Code. You can learn more about Python support in Visual Studio Code in the documentation.
Read more

Data Science with Python in Visual Studio Code

Today we’re very excited to announce the availability of Data Science features in the Python extension for Visual Studio Code! With the addition of these features, you can now work with data interactively in Visual Studio Code, whether it is for exploring data or for incorporating machine learning models into applications, making Visual Studio Code an exciting new option for those who prefer an editor for data science tasks.
Read more

Get started with $200 of Azure credits and 12 months of popular services – for free.

-->

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 Development In Visual Studio

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.

Visual Studio 2019 and Visual Studio 2017

  1. 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.

    Tip

    The 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.

  2. 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.

    Visual Studio Community 2017 for Mac A free and full-featured solution for individual developers to create applications for Android, iOS, macOS, cloud. Visual Studio Mac is a mobile-first, cloud-first IDE. Everything you need for mobile, cloud and Mac development. Download Visual Studio for Mac today. I have downloaded the Visual Studio Community 2017 version for mac. I opened up the installer and I guess automatically all the components are automatically set for installation or you can choose which ones you wish to install. I chose to go ahead and install everything. Click the button to download the latest version of Visual Studio 2017 for Mac. For instructions on setup and install, see the Setup and Install Visual Studio for Mac documentation. To learn more about Visual Studio 2017 for Mac, see Mac System Requirements and Mac Platform Targeting. Visual Studio Community for Mac is a full-featured and free IDE for creating modern applications for Android, iOS, macOS, as well as web applications and cloud services. Try out Visual Studio Community for Mac for a fully-featured and extensible IDE; An updated alternative to Visual Studio. Visual studio code for mac.

    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.

    Note

    The 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 workload. This workload includes support for the Python and F# languages. For more information, see Data science and analytical applications workload.

  3. 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.
  4. 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

  1. Run the Visual Studio installer through Control Panel > Programs and Features, selecting Microsoft Visual Studio 2015 and then Change.

  2. In the installer, select Modify.

  3. Select Programming Languages > Python Tools for Visual Studio and then Next:

  4. 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

  1. 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
  2. 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

Visual

By default, Python support is installed for all users on a computer.

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:

Studio

  • <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.