# Accessing PyTorch documentation offline

**URL:** <https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453>\
**Category:** Uncategorized\
**Created:** [June 29, 2018, 6:38am UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453 "2018-06-29T06:38:41Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![sahni](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/sahni/32/5442_2.png) [@sahni](https://discuss.pytorch.org/u/sahni)\
**Post date:** [June 29, 2018, 6:38am UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453/1 "2018-06-29T06:38:41Z")

</div>

Is there a way for me to access PyTorch documentation offline? I checked the github repo and there seems to be a doc folder but I am not clear on how to generate the documentation so that I can use it offline.  
I am looking for documentation for stable 0.4.0.

---

<div class="post-metadata">

**Author:** ![albanD](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alband/32/215_2.png) [@albanD](https://discuss.pytorch.org/u/albanD)\
**Post date:** [June 29, 2018, 9:07am UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453/2 "2018-06-29T09:07:19Z")

</div>

Hi,

The doc needs to be generated from the source code.  
To get it you will need to go into the `docs` folder and then run `make` (or the bat file if you’re on windows). You might need to install the dependencies in the requirements.txt file before.  
Once `make` run, you will have a local html file that you can browse offfline containing all the doc.

---

<div class="post-metadata">

**Author:** ![sahni](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/sahni/32/5442_2.png) [@sahni](https://discuss.pytorch.org/u/sahni)\
**Post date:** [June 29, 2018, 5:09pm UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453/3 "2018-06-29T17:09:21Z")

</div>

Thanks. I was able to generate the documentation in html format using the steps you mentioned. Any idea how I can generate the docs specific to 0.4.0 stable? The generated docs show unstable 0.3.0.post4. I tried checking out to tag v0.4.0 in repo, but it still generates the unstable docs.

---

<div class="post-metadata">

**Author:** ![albanD](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alband/32/215_2.png) [@albanD](https://discuss.pytorch.org/u/albanD)\
**Post date:** [June 29, 2018, 5:12pm UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453/4 "2018-06-29T17:12:06Z")

</div>

The version number might not be correct. Because the build system for the releases is reponsible for setting the versions to something else than “unstable”.  
It will generate the doc for the current version of the repo. So if you’re at tag 0.4.0, it will generate the doc for this version.

---

<div class="post-metadata">

**Author:** ![sahni](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/sahni/32/5442_2.png) [@sahni](https://discuss.pytorch.org/u/sahni)\
**Post date:** [June 29, 2018, 5:13pm UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453/5 "2018-06-29T17:13:34Z")

</div>

Thanks for clarifying.

---

<div class="post-metadata">

**Author:** ![FrancoisFleuret](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/francoisfleuret/32/5770_2.png) [@FrancoisFleuret](https://discuss.pytorch.org/u/FrancoisFleuret)\
**Post date:** [July 21, 2018, 1:59pm UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453/6 "2018-07-21T13:59:45Z")

</div>

It would be quite handy to have conda packages with the documentation though.

---

<div class="post-metadata">

**Author:** ![Edgar\_Medina](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/edgar_medina/32/12198_2.png) [@Edgar\_Medina](https://discuss.pytorch.org/u/Edgar_Medina)\
**Post date:** [November 11, 2018, 5:03pm UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453/7 "2018-11-11T17:03:59Z")

</div>

Hi, but how can I run the Makefile in some specific folder? I want to install the docs only.

---

<div class="post-metadata">

**Author:** ![Wendell\_Philips](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/wendell_philips/32/9695_2.png) [@Wendell\_Philips](https://discuss.pytorch.org/u/Wendell_Philips)\
**Post date:** [March 5, 2019, 2:12pm UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453/8 "2019-03-05T14:12:46Z")

</div>

how to install the dependencies in the requirements.txt

```bash
sh ./Makefile
./Makefile: 5: ./Makefile: SPHINXOPTS: not found
./Makefile: 6: ./Makefile: SPHINXBUILD: not found
./Makefile: 7: ./Makefile: SPHINXPROJ: not found
./Makefile: 8: ./Makefile: SOURCEDIR: not found
./Makefile: 9: ./Makefile: BUILDDIR: not found
./Makefile: 10: ./Makefile: PYCMD: not found
./Makefile: 13: ./Makefile: help:: not found
./Makefile: 14: ./Makefile: SPHINXBUILD: not found
./Makefile: 14: ./Makefile: SOURCEDIR: not found
./Makefile: 14: ./Makefile: BUILDDIR: not found
./Makefile: 14: ./Makefile: SPHINXOPTS: not found
./Makefile: 14: ./Makefile: O: not found
./Makefile: 14: ./Makefile: @: not found
./Makefile: 16: ./Makefile: figures:: not found
./Makefile: 17: ./Makefile: PYCMD: not found
./Makefile: 17: ./Makefile: @: not found
./Makefile: 19: ./Makefile: docset:: not found
./Makefile: 20: ./Makefile: SPHINXPROJ: not found
./Makefile: 20: ./Makefile: SOURCEDIR: not found
./Makefile: 20: ./Makefile: BUILDDIR: not found
./Makefile: 20: ./Makefile: doc2dash: not found
./Makefile: 23: ./Makefile: SPHINXPROJ: not found
./Makefile: 23: ./Makefile: SPHINXPROJ: not found
cp: cannot stat '.docset/icon.png': No such file or directory
./Makefile: 24: ./Makefile: SPHINXPROJ: not found
./Makefile: 24: ./Makefile: SPHINXPROJ: not found
convert: unable to open image `.docset/icon@2x.png': No such file or directory @ error/blob.c/OpenBlob/2712.
convert: no images defined `.docset/icon.png' @ error/convert.c/ConvertImageCommand/3210.
./Makefile: 26: ./Makefile: html-stable:: not found
Traceback (most recent call last):
  File "source/scripts/build_activation_images.py", line 67, in <module>
    function = torch.nn.modules.activation. __dict__ [function_name]()
KeyError: 'CELU'
Makefile:17: recipe for target 'figures' failed
make: *** [figures] Error 1
./Makefile: 33: ./Makefile: .PHONY:: not found
./Makefile: 37: ./Makefile: %:: not found
./Makefile: 38: ./Makefile: SPHINXBUILD: not found
./Makefile: 38: ./Makefile: SOURCEDIR: not found
./Makefile: 38: ./Makefile: BUILDDIR: not found
./Makefile: 38: ./Makefile: SPHINXOPTS: not found
./Makefile: 38: ./Makefile: O: not found
./Makefile: 38: ./Makefile: @: not found
./Makefile: 40: ./Makefile: clean:: not found
./Makefile: 41: ./Makefile: @echo: not found
./Makefile: 42: ./Makefile: BUILDDIR: not found
./Makefile: 42: ./Makefile: BUILDDIR: not found
./Makefile: 42: ./Makefile: @rm: not found

```

---

<div class="post-metadata">

**Author:** ![albanD](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alband/32/215_2.png) [@albanD](https://discuss.pytorch.org/u/albanD)\
**Post date:** [March 5, 2019, 2:34pm UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453/9 "2019-03-05T14:34:47Z")

</div>

You’re note suppose to execute a `Makefile` with bash. Just run `make` in the folder where the `Makefile` is.

---

<div class="post-metadata">

**Author:** ![Wendell\_Philips](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/wendell_philips/32/9695_2.png) [@Wendell\_Philips](https://discuss.pytorch.org/u/Wendell_Philips)\
**Post date:** [March 6, 2019, 1:48am UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453/10 "2019-03-06T01:48:53Z")

</div>

Thank you for your Replay. But I still got the issue.

> [@Wendell\_Philips](#):
>
> ```bash
> Traceback (most recent call last): File "source/scripts/build_activation_images.py", line 67, in &lt;module&gt; function = torch.nn.modules.activation. __dict__ [function_name]() KeyError: 'CELU' Makefile:17: recipe for target 'figures' failed make: *** [figures] Error 1
> 
> ```

---

<div class="post-metadata">

**Author:** ![joaobrasil65](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/joaobrasil65/32/34806_2.png) [@joaobrasil65](https://discuss.pytorch.org/u/joaobrasil65)\
**Post date:** [May 23, 2021, 4:44pm UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453/11 "2021-05-23T16:44:38Z")

</div>

Not working for me in May 2021

ARNING: autodoc: failed to import class ‘ConvReLU3d’ from module ‘torch.nn.intrinsic.qat’; the following exception was raised:  
Traceback (most recent call last):  
File “c:\python38\lib\site-packages\sphinx\util\inspect.py”, line 403, in safe\_getattr  
return getattr(obj, name, \*defargs)  
AttributeError: module ‘torch.nn.intrinsic.qat’ has no attribute ‘ConvReLU3d’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):  
File “c:\python38\lib\site-packages\sphinx\ext\autodoc\importer.py”, line 111, in import\_object  
obj = attrgetter(obj, mangled\_name)  
File “c:\python38\lib\site-packages\sphinx\ext\autodoc\__init_\_.py”, line 320, in get\_attr  
return autodoc\_attrgetter(self.env.app, obj, name, \*defargs)  
File “c:\python38\lib\site-packages\sphinx\ext\autodoc\__init_\_.py”, line 2604, in autodoc\_attrgetter  
return safe\_getattr(obj, name, \*defargs)  
File “c:\python38\lib\site-packages\sphinx\util\inspect.py”, line 419, in safe\_getattr  
raise AttributeError(name) from exc  
AttributeError: ConvReLU3d

c:\python38\lib\site-packages\torch\nn\quantized\modules\activation.py:docstring of torch.nn.quantized.modules.activation.ReLU6:14: WARNING: image file not readable: scripts/activation\_images/ReLU6.png  
looking for now-outdated files… none found  
pickling environment… done  
checking consistency… done  
preparing documents… done  
writing output… [0%] complex\_numbers  
Exception occurred:  
File “c:\python38\lib\subprocess.py”, line 1307, in \_execute\_child  
hp, ht, pid, tid = \_winapi.CreateProcess(executable, args,  
FileNotFoundError: [WinError 2] The system cannot find the file specified  
The full traceback has been saved in C:\Users\paulb\AppData\Local\Temp\sphinx-err-nxayl6xl.log, if you want to report the issue to the developers.  
Please also report this if it was a user error, so that a better error message can be provided next time.  
A bug report can be filed in the tracker at [https://github.com/sphinx-doc/sphinx/issues](https://github.com/sphinx-doc/sphinx/issues). Thanks!

---

<div class="post-metadata">

**Author:** ![albanD](https://discuss.pytorch.org/user_avatar/discuss.pytorch.org/alband/32/215_2.png) [@albanD](https://discuss.pytorch.org/u/albanD)\
**Post date:** [May 24, 2021, 1:36pm UTC](https://discuss.pytorch.org/t/accessing-pytorch-documentation-offline/20453/12 "2021-05-24T13:36:42Z")

</div>

Hi,

We build the doc on linux machines all the time I’m afraid. It might be possible that it is not working on Windows 😕  
Do you have a linux machine you can use to get the doc by any chance?

Another convoluted way to do this is to download it directly from our build.  
On every PR (pick one randomly on pytorch github), there is a `pytorch_python_doc_build` that actually builds the doc. You can check there the artifact page that contains the full doc: [https://app.circleci.com/pipelines/github/pytorch/pytorch/326575/workflows/30cd30c4-fea5-4165-ab08-a54b85d0e67e/jobs/13676034/artifacts](https://app.circleci.com/pipelines/github/pytorch/pytorch/326575/workflows/30cd30c4-fea5-4165-ab08-a54b85d0e67e/jobs/13676034/artifacts)  
You can download all of these as a single file by using circle CI API directly: [Storing Build Artifacts - CircleCI](https://circleci.com/docs/2.0/artifacts/#downloading-all-artifacts-for-a-build-on-circleci)
