# Distributed error. module 'torch.distributed' has no attribute 'is\_initialized'

**URL:** <https://discuss.pytorch.org/t/distributed-error-module-torch-distributed-has-no-attribute-is-initialized/31872>\
**Category:** distributed\
**Created:** [December 11, 2018, 2:57pm UTC](https://discuss.pytorch.org/t/distributed-error-module-torch-distributed-has-no-attribute-is-initialized/31872 "2018-12-11T14:57:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![congve1](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/congve1/32/7603_2.png) [@congve1](https://discuss.pytorch.org/u/congve1)\
**Post date:** [December 11, 2018, 2:57pm UTC](https://discuss.pytorch.org/t/distributed-error-module-torch-distributed-has-no-attribute-is-initialized/31872/1 "2018-12-11T14:57:51Z")

</div>

I’ve installed pytorch 1.0 on windows.

 ![TIM%E6%88%AA%E5%9B%BE20181211225234](https://discuss.pytorch.org/uploads/default/original/2X/3/321d3c2d53b59092e2330b46a65d29171bbb7508.png)  
When I try to use webcam demo provided by [maskrcnn-benchmark](https://github.com/facebookresearch/maskrcnn-benchmark). An error occured:

```auto
Traceback (most recent call last):
  File "webcam.py", line 80, in <module>
    main()
  File "webcam.py", line 64, in main
    min_image_size=args.min_image_size,
  File "G:\PyProjects\maskrcnn-benchmark\demo\predictor.py", line 115, in __init__
    _ = checkpointer.load(cfg.MODEL.WEIGHT)
  File "g:\pyprojects\maskrcnn-benchmark\maskrcnn_benchmark\utils\checkpoint.py", line 61, in load
    checkpoint = self._load_file(f)
  File "g:\pyprojects\maskrcnn-benchmark\maskrcnn_benchmark\utils\checkpoint.py", line 128, in _load_file
    cached_f = cache_url(f)
  File "g:\pyprojects\maskrcnn-benchmark\maskrcnn_benchmark\utils\model_zoo.py", line 44, in cache_url
    if not os.path.exists(cached_file) and is_main_process():
  File "g:\pyprojects\maskrcnn-benchmark\maskrcnn_benchmark\utils\comm.py", line 28, in is_main_process
    if not torch.distributed.is_initialized():
AttributeError: module 'torch.distributed' has no attribute 'is_initialized'

```

But when I checked the pytorch 1.0 document, the `torch.distributed` module does have the `is_initialized()` method.  
How to solve this problem

---

<div class="post-metadata">

**Author:** ![jinfagang](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/jinfagang/32/9405_2.png) [@jinfagang](https://discuss.pytorch.org/u/jinfagang)\
**Post date:** [September 27, 2019, 2:24am UTC](https://discuss.pytorch.org/t/distributed-error-module-torch-distributed-has-no-attribute-is-initialized/31872/2 "2019-09-27T02:24:14Z")

</div>

Same issue herehyrtjedtujtuktu

---

<div class="post-metadata">

**Author:** ![pietern](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/pietern/32/4981_2.png) [@pietern](https://discuss.pytorch.org/u/pietern)\
**Post date:** [September 27, 2019, 8:03am UTC](https://discuss.pytorch.org/t/distributed-error-module-torch-distributed-has-no-attribute-is-initialized/31872/3 "2019-09-27T08:03:47Z")

</div>

We don’t support Windows for torch.distributed, unfortunately.
