카테고리 없음

(Error) NameError: name 'tqdm' is not defined

DeNarO 2021. 2. 11. 21:21

<문제발생>

Full stacktrace:

Traceback (most recent call last): File "/usr/local/bin/stylegan2_pytorch", line 36, in <module> fire.Fire(train_from_folder) File "/usr/local/lib/python3.6/dist-packages/fire/core.py", line 138, in Fire component_trace = _Fire(component, args, parsed_flag_args, context, name) File "/usr/local/lib/python3.6/dist-packages/fire/core.py", line 471, in _Fire target=component.__name__) File "/usr/local/lib/python3.6/dist-packages/fire/core.py", line 675, in _CallAndUpdateTrace component = fn(*varargs, **kwargs) File "/usr/local/bin/stylegan2_pytorch", line 30, in train_from_folder for _ in tqdm(range(num_train_steps - model.steps), mininterval=10.): NameError: name 'tqdm' is not defined

 

<해결방법>

If it helps, this is the output from running !pip install stylegan2_pytorch:

Downloading https://files.pythonhosted.org/packages/c7/31/9bf4e412d3da8aa8b23a2f8ed3b6443f74e7d12be33e01e72df3c7a59794/stylegan2_pytorch-0.3.tar.gz Collecting fire Downloading https://files.pythonhosted.org/packages/d9/69/faeaae8687f4de0f5973694d02e9d6c3eb827636a009157352d98de1129e/fire-0.2.1.tar.gz (76kB) |████████████████████████████████| 81kB 5.7MB/s Requirement already satisfied: numpy in /usr/local/lib/python3.6/dist-packages (from stylegan2_pytorch) (1.17.5) Requirement already satisfied: tqdm in /usr/local/lib/python3.6/dist-packages (from stylegan2_pytorch) (4.28.1) Requirement already satisfied: torch in /usr/local/lib/python3.6/dist-packages (from stylegan2_pytorch) (1.3.1) Requirement already satisfied: torchvision in /usr/local/lib/python3.6/dist-packages (from stylegan2_pytorch) (0.4.2) Requirement already satisfied: pillow in /usr/local/lib/python3.6/dist-packages (from stylegan2_pytorch) (6.2.2) Requirement already satisfied: six in /usr/local/lib/python3.6/dist-packages (from fire->stylegan2_pytorch) (1.12.0) Requirement already satisfied: termcolor in /usr/local/lib/python3.6/dist-packages (from fire->stylegan2_pytorch) (1.1.0) Building wheels for collected packages: stylegan2-pytorch, fire Building wheel for stylegan2-pytorch (setup.py) ... done Created wheel for stylegan2-pytorch: filename=stylegan2_pytorch-0.3-cp36-none-any.whl size=7858 sha256=3e661430b2eecc2c0cf022ba6cdd78effbf0eac81915a3933c0035312e1f9e76 Stored in directory: /root/.cache/pip/wheels/31/f6/3e/7fe4757e5f068d2cdc8a5ec79013e08c159cdd01c8efe32af5 Building wheel for fire (setup.py) ... done Created wheel for fire: filename=fire-0.2.1-py2.py3-none-any.whl size=103527 sha256=f9ac6fcada01d33b0505fac6c7914890b51fce53465475feb5b41549555d948d Stored in directory: /root/.cache/pip/wheels/31/9c/c0/07b6dc7faf1844bb4688f46b569efe6cafaa2179c95db821da Successfully built stylegan2-pytorch fire Installing collected packages: fire, stylegan2-pytorch Successfully installed fire-0.2.1 stylegan2-pytorch-0.3

 

<결론>

https://files.pythonhosted.org/packages/c7/31/9bf4e412d3da8aa8b23a2f8ed3b6443f74e7d12be33e01e72df3c7a59794/stylegan2_pytorch-0.3.tar.gz

https://files.pythonhosted.org/packages/d9/69/faeaae8687f4de0f5973694d02e9d6c3eb827636a009157352d98de1129e/fire-0.2.1.tar.gz 

설치