PeizhuoLi / ganimator

A motion generation model learned from a single example [SIGGRAPH 2022]
Other
379 stars 46 forks source link

Add explanation for pytorch bug related to setuptools #17

Closed SMMousaviSP closed 1 year ago

SMMousaviSP commented 1 year ago

There is a known bug in the earlier versions of pytorch including the version used in this project. As of now, trying to train the model yourself may result in the following error:

Traceback (most recent call last):
  File "train.py", line 11, in <module>
    from torch.utils.tensorboard import SummaryWriter
  File "/Users/smmousavi/.pyenv/versions/miniconda3-4.7.10/lib/python3.7/site-packages/torch/utils/tensorboard/__init__.py", line 4, in <module>
    LooseVersion = distutils.version.LooseVersion
AttributeError: module 'distutils' has no attribute 'version'

This bug has been fixed in newer versions: https://github.com/pytorch/pytorch/pull/69904

To use version 1.10.0 of pytorch required by this project, downgrading setuptools to version 59.5.0 will solve this problem. The version of setuptools in environment.yamlfile is below this version but if someone wants to install the dependencies on their own, they need to manually downgrade the setuptools. For users not on linux and without CUDA the environment can not be resolved and it is needed to manually install the dependencies.

I added an explanation how to fix this bug in the README.md file.