Summary of pytorch environment usage problems

1. tensorboard cannot be used

  • Description of the problem:
    console input tensorboard --logdir
    displayAttributeError: module 'distutils' has no attribute 'version'

  • Solution:
    You can see this prompt, indicating that the installation of tensorboard is OK.
    It is setuptoolsa problem caused by the version too high.
    Step 1: Uninstall pip uninstall setuptools(must be uninstalled with pip)
    Step 2: Install the specified version pip或者conda install setuptools==58.0.4
    Reference link: link

2. Opencv-python higher version installation

  • pip install opencv-python -i https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple

3. The version of protobuf is wrong

  • pip install protobuf==3.19.0

4. pycocotools installation

  • First install the VC environment, restart the computer
  • Installpip install pycocotools-windows -i https://pypi.tuna.tsinghua.edu.cn/simple
  • Installpip install pycocotools -i https://pypi.tuna.tsinghua.edu.cn/simple

insert image description here
insert image description here
insert image description here

Guess you like

Origin blog.csdn.net/CXYYL/article/details/129396225