Visual Studio Python 3.8

  



Python 3.8 is still not supported in Visual Studio 2019 IDE Some of features are not supported as there is a warning when I create a new Python file in Visual Studio that my current Python is not supported in IDE(i.e. 3.8.5) Visual Studio Code is a good alternative but Visual Studio 2019 is a better option for Python because it's a IDE.

  • The Python extension is named Python and is published by Microsoft. Python interpreter. If there was an issue installing the Python interpreter, you can install Python 3.8 from the Microsoft Store. Along with the Python extension, you need to install a Python interpreter for development with Python.
  • 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.

TensorFlow 2 packages are available

  • tensorflow —Latest stable release with CPU and GPU support (Ubuntu and Windows)
  • tf-nightly —Preview build (unstable) . Ubuntu and Windows include GPU support .

Older versions of TensorFlow

For TensorFlow 1.x, CPU and GPU packages are separate:

  • tensorflow1.15 —Release for CPU-only
  • tensorflow-gpu1.15 —Release with GPU support (Ubuntu and Windows)

System requirements

Visual studio python console
  • Python 3.6–3.8
    • Python 3.8 support requires TensorFlow 2.2 or later.
  • pip 19.0 or later (requires manylinux2010 support)
  • Ubuntu 16.04 or later (64-bit)
  • macOS 10.12.6 (Sierra) or later (64-bit) (no GPU support)
    • macOS requires pip 20.3 or later
  • Windows 7 or later (64-bit)
  • Raspbian 9.0 or later
  • GPU support requires a CUDA®-enabled card (Ubuntu and Windows)
Note: Installing TensorFlow 2 requires Visual studio code python 3.9 a newer version of pip .

Hardware requirements

  • Starting with TensorFlow 1.6, binaries use AVX instructions which may not run on older CPUs.
  • Read the GPU support guide to set up a CUDA®-enabled GPU card on Ubuntu or Windows.

1. Install the Python development environment on your system

Check if your Python environment is already configured:

Requires Python 3.6–3.8, pip and venv >= 19.0

If these packages are already installed, skip to the next step.
Otherwise, install Python , the pip package manager , and venv :

Ubuntu

macOS

Install using the Homebrew package manager:

Windows

Install the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, and 2019 . Starting with the TensorFlow 2.1.0 version, the msvcp140_1.dll file is required from this package (which may not be provided from older redistributable packages). The redistributable comes with Visual Studio 2019 but can be installed separately:

  1. Go to the Microsoft Visual C++ downloads ,
  2. Scroll down the page to the Visual Studio 2015, 2017 and 2019 section.
  3. Download and install the Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017 and 2019 for your platform.

Make sure long paths are enabled on Windows.

Install the 64-bit Python 3 release for Windows (select pip as an optional feature).

Raspberry Pi

Requirements for the Raspbian operating system:

Other

Caution: Upgrading the system pip can cause problems .
If not in a virtual environment, use python3 -m pip for the commands below. This ensures that you upgrade and use the Python pip instead of the system pip Visual .

2. Create a virtual environment (recommended)

Python virtual environments are used to isolate package installation from the system.

Ubuntu / macOS

Create a new virtual environment by choosing a Python interpreter and making a ./venv directory to hold it:

Activate the virtual environment using a shell-specific command:

When the virtual environment is active, your shell prompt is prefixed with (venv) .

Install packages within a virtual environment without affecting the host system setup. Start by upgrading pip :

And to exit the virtual environment later:

Windows

Create a new virtual environment by choosing a Python interpreter and making a .venv directory to hold it:

Activate the virtual environment:

Install packages within a virtual environment without affecting the host system setup. Start by upgrading pip :

Visual studio python 3.8 tutorial

And to exit the virtual environment later:

Conda

While the TensorFlow provided pip package is recommended, a community-supported Anaconda package is available. To install, read the Anaconda TensorFlow guide .

3. Install the TensorFlow pip package

Choose one of the following TensorFlow packages to install from PyPI :

  • tensorflow —Latest stable release with CPU and GPU support (Ubuntu and Windows) .
  • tf-nightly —Preview build (unstable) . Ubuntu and Windows include GPU support .
  • tensorflow1.15 —The final version of TensorFlow 1.x.
Package dependencies are automatically installed. These are listed in the setup.py file under REQUIRED_PACKAGES .

Virtual environment install

Verify the install:

System install

Verify the install:

Success: If a tensor is returned, you've installed TensorFlow successfully. Read the tutorials to get started.

Package location

A few installation mechanisms require the URL of the TensorFlow Python package. The value you specify depends on your Python version.

Version URL
Linux
Python 3.6 GPU support https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.4.0-cp36-cp36m-manylinux2010_x86_64.whl
Python 3.6 CPU-only https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.4.0-cp36-cp36m-manylinux2010_x86_64.whl
Python 3.7 GPU support https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.4.0-cp37-cp37m-manylinux2010_x86_64.whl
Python 3.7 CPU-only https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.4.0-cp37-cp37m-manylinux2010_x86_64.whl
Python 3.8 GPU support https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-2.4.0-cp38-cp38-manylinux2010_x86_64.whl
Python 3.8 CPU-only https://storage.googleapis.com/tensorflow/linux/cpu/tensorflow_cpu-2.4.0-cp38-cp38-manylinux2010_x86_64.whl
macOS (CPU-only)
Python 3.6 https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.4.0-cp36-cp36m-macosx_10_9_x86_64.whl
Python 3.7 https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.4.0-cp37-cp37m-macosx_10_9_x86_64.whl
Python 3.8 https://storage.googleapis.com/tensorflow/mac/cpu/tensorflow-2.4.0-cp38-cp38-macosx_10_14_x86_64.whl
Windows
Python 3.6 GPU support https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-2.4.0-cp36-cp36m-win_amd64.whl
Python 3.6 CPU-only https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.4.0-cp36-cp36m-win_amd64.whl
Python 3.7 GPU support https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-2.4.0-cp37-cp37m-win_amd64.whl
Python 3.7 CPU-only https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.4.0-cp37-cp37m-win_amd64.whl
Python 3.8 GPU support https://storage.googleapis.com/tensorflow/windows/gpu/tensorflow_gpu-2.4.0-cp38-cp38-win_amd64.whl
Python 3.8 CPU-only https://storage.googleapis.com/tensorflow/windows/cpu/tensorflow_cpu-2.4.0-cp38-cp38-win_amd64.whl
Raspberry PI (CPU-only)
Python 3, Pi0 or Pi1 https://storage.googleapis.com/tensorflow/raspberrypi/tensorflow-2.3.0rc2-cp35-none-linux_armv6l.whl
Python 3, Pi2 or Pi3 https://storage.googleapis.com/tensorflow/raspberrypi/tensorflow-2.3.0rc2-cp35-none-linux_armv6l.whl

Visual Studio Code Python 3.9

Fix Python on Windows:

by installing any ONE of these choices:

  • Microsoft Build Tools for Visual Studio.
  • Alternative link to Microsoft Build Tools for Visual Studio.
  • Offline installer: vs_buildtools.exe

Select: Workloads → Desktop development with C++, then for Individual Components, select only:

  • Windows 10 SDK
  • C++ x64/x86 build tools

The build tools allow using MSVC “cl.exe” C / C++ compiler from the command line.

Visual StudiochangedtheBuild Toolsfrom being C++ specific in late 2017.Thus newer Visual Studio versions work in place of older versions.

2019

Visual Studio Python 3.8 Tutorial

Windows Python needs Visual C++ libraries installed via the SDK to build code, such as via setuptools.extension.Extension or numpy.distutils.core.Extension.For example, buildingf2pymodules in Windows with Python requires Visual C++ SDK as installed above.On Linux and Mac, the C++ libraries are installed with the compiler.

Python / Visual Studiobuild matrix

Python Microsoft Docs

Related: Fix Python 2 error Visual C++ 10.0 missing vcvarsall.bat