Integrated graphics card installed cpu version tensorflow and pytorch

1. Check the computer graphics card

Check whether your computer has a discrete graphics card and what type of graphics card it has.
Control Panel → Device Manager → Display Adapter →
Insert image description here
Because it is an integrated graphics card and there is no independent graphics card, the GPU version of tensorflow and pytorch cannot be installed. (The gpu version of tensorflow needs to install cuda and cudnn, but the cpu version does not need to be installed)

2. Install anaconda and pycharm

Go to the official website to download the installation package corresponding to your computer.

  1. anaconda official website: https://www.anaconda.com/products/distribution#macos
    Installation notes:
    Insert image description here

  2. For pycharm installation,
    you can find it randomly on the webpage and download the software. There should be an official website.
    Note: Just check everything that can be checked.

3. Create the corresponding virtual environment

Avoid polluting the native environment and create a corresponding virtual environment

  1. Open anaconda and create a virtual environment
    Insert image description here

4.Install pytorch

  1. Open the corresponding virtual environment.
    Click the green triangle next to the created virtual environment to open the virtual environment.
    Insert image description here

  2. Copy the mirror source to speed up downloads

conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main/conda config --set show_channel_urls yes

  1. Prevent downloading from being disconnected if it takes too long, with a delay of 1000s

conda config --set remote_read_timeout_secs 1000.0

Preparations completed

Insert image description here

  1. To download and install the CPU version of torch
    go to the pytorch official website. Get the download code
    official website: https://pytorch.org/get-started/locally/
    My computer installation is as follows:

conda install pytorch torchvision torchaudio cpuonly -c pytorch

Screenshot below

Insert image description here
Download completed
Insert the download complete picture description here

  1. Check whether the torch installation is successful

pip list

Insert image description here

5.Install tensorflow

  1. Open the corresponding virtual environment
    Insert image description here
    Insert image description here

  2. Add image source to install tensorflow

pip install tensorflow-cpu -i https://pypi.tuna.tsinghua.edu.cn/simple/

Insert image description here

  1. Check whether the installation is successful

pip list

Insert image description here

Guess you like

Origin blog.csdn.net/tenju/article/details/124767888