问题
Often I need to work offline for my python projects. How can I download PyCharm documentation for offline use?
回答1:
There's an option in PyCharm: go "Settings/Tools/Python External Documentation"; BUT it seems thishas not been working with local files for a long time due to a PyCharm
bug.
You can start a local server and pretend it to be a docs.python.org site.
Get docs archive
Unpack archive to folder named exactly "3.6"
Edit your hosts file:
C:\Windows\System32\drivers\etc\hosts or /etc/hosts
127.0.0.1 docs.python.org
::1 docs.python.org
Reboot
Run server. Go to the dir where "3.6" folder is located and run:
python -m http.server 80 --bind 127.0.0.1
for linux use
sudo python -m http.server 80 --bind 127.0.0.1
来源:https://stackoverflow.com/questions/45741935/offline-documentation-for-specific-version-of-pycharm