Installing tensorflow on Windows

Time:2023-11-8

I. Environmental configuration

Installation: python 3.8, Miniconda, Visual C++

1.1 Installing python 3.8

go intopython official websiteInstallation DownloadWindows installer (64-bit)(The version I downloaded)
Installing tensorflow on Windows

1.2 Installing Miniconda

go intoMiniconda websiteInstallation DownloadMiniconda3 Windows 64-bit(I downloaded the version)

  • Note that the version downloaded here should correspond to the python version.
    Installing tensorflow on Windows

1.3 Installing Visual C++

go intoVisual C++ official websiteInstallation DownloadVC_redist.x64.exe
Installing tensorflow on Windows
After all the installation is complete, click on the bottom left corner of the program, as shown in the figure below

Installing tensorflow on Windows

Second, install Tensorflow

Tensorflow is divided into two versions of CPU and GPU installation, due to their own computer limitations, only installed the CPU version, the GPU version is faster (but my computer does not support, you need to NVIDIA GPU450 + on the version), the following is only the CPU version of the installation

  • 1) EnterAnaconda Promptpage, enter the command
pip install tensorflow -i https://pypi.doubanio.com/simple/

Installing tensorflow on Windows

  • 2) Install the other auxiliary libraries, pandas, matplotlib and notebook, by entering the command
pip install pandas matplotlib notebook -i https://pypi.doubanio.com/simple/

Installing tensorflow on Windows

  • 3) Open notebook and enter the following command
jupyter notebook

Or (if it won’t open above)

python -m notebook

A window will then automatically pop up showing the notebook page, click on thenewand then clickPython 3 (ipykernel)A new programming environment can be created.
Installing tensorflow on Windows
Then, typeimport tensorflow as tfandprint(tf.__version__)For a printable version, click(of a computer) runor shortcut keyshift+Enter
Installing tensorflow on Windows
That completes the installation of tensorflow.

Recommended Today

uniapp and applet set tabBar and show and hide tabBar

(1) Set the tabBar: uni.setTabberItem({}); wx.setTabberItem({}); indexnumberisWhich item of the tabBar, counting from the left, is indexed from 0.textstringnoButton text on tabiconPathstringnoImage PathselectedIconPathstringnoImage path when selectedpagePathstringnoPage absolute pathvisiblebooleannotab Whether to display uni.setTabBarItem({ index: 0, text: ‘text’, iconPath: ‘/path/to/iconPath’, selectedIconPath: ‘/path/to/selectedIconPath’, pagePath: ‘pages/home/home’ }) wx.setTabBarItem({ index: 0, text: ‘text’, iconPath: ‘/path/to/iconPath’, selectedIconPath: ‘/path/to/selectedIconPath’, pagePath: ‘pages/home/home’ }) […]