The command:

sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/pydoc /usr/bin/pydoc

Creates a link called /usr/bin/pydoc that points to:

/System/Library/Frameworks/Python.framework/Versions/2.7/bin/pydoc

On my system, this file doesn't exist. Instead, I have:

/System/Library/Frameworks/Python.framework/Versions/2.7/bin/pydoc2.7

Notice the 2.7 at the end.

So you've created a link to a file that doesn't exist and you get a complaint on your command line. The fix is simple, delete /usr/bin/pydoc (first make sure it is a link by typing ls -l /usr/bin and look for pydoc -- if it has an l next to its permissions, then it's a link). Then, type:

sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/pydoc2.7 /usr/bin/pydoc

This will create a link to the correct file and you should be able to run pydoc as a script now.

Answer from huu on Stack Overflow
🌐
Readthedocs
pydoc-zh.readthedocs.io › en › latest › using › mac.html
4. Using Python on a Macintosh — Python 2.7.6 documentation
A framework /Library/Frameworks/Python.framework, which includes the Python executable and libraries. The installer adds this location to your shell path. To uninstall MacPython, you can simply remove these three things.
Discussions

$ pydoc -g. I'm a newbie programming in p… - Apple Community
Hi, I'm using IDLE to learn to program in Python on my mac (IDLE 2.7.1, OS 10.4.11). The book I'm using instructs me to enter this in the command line: $ pydoc -g When I type that into IDLE, it says there is a syntax error with the $ symbol. I'm sure there is a simple answer, but I'm lost at ... More on discussions.apple.com
🌐 discussions.apple.com
March 7, 2011
How do you use pydoc to create Python htm… - Apple Community
How do you use pydoc to create Python html documentation on a Mac? More on discussions.apple.com
🌐 discussions.apple.com
April 27, 2022
Where is python's documentation located on a Mac? - Stack Overflow
Other than the pydoc command line tool (which provides documentation from the source docstrings and introspection only), there is no documentation installed by OS X. More on stackoverflow.com
🌐 stackoverflow.com
macos - How can I run pydoc when it doesn't appear to be on the PATH? - Stack Overflow
I am using MACOSX 10.12.3 and Python 3.52 I am running into issues when running pydoc in a bash script in python IDLE. For example: myFile = ‘/home/user/afile.py’ import subprocess subp... More on stackoverflow.com
🌐 stackoverflow.com
🌐
Command Not Found
command-not-found.com › pydoc
command-not-found.com – pydoc
apt-get install python · Dockerfile · dockerfile.run/pydoc · Docker · docker run cmd.cat/pydoc pydoc powered by Commando · Print documentation on a subject (Python keyword, topic, function, module, package, etc.): pydoc subject · Start ...
🌐
Readthedocs
pydoc-zh.readthedocs.io › en › latest › install › index.html
Installing Python Modules — Python 2.7.6 documentation
If you don’t choose an installation directory—i.e., if you just run setup.py install—then the install command installs to the standard location for third-party Python modules. This location varies by platform and by how you built/installed Python itself. On Unix (and Mac OS X, which is ...
🌐
Apple Community
discussions.apple.com › thread › 2774320
$ pydoc -g. I'm a newbie programming in p… - Apple Community
March 7, 2011 - Terminal appears to hang. You need to look around for the pydoc panel. I had to move my terminal window. as suggested, here is what I did in terminal in /etc/bashrc in /Users/mac/.bash_profile but claims to be -bash in /Users/mac/config/profile.bash claims to be -bash in .
🌐
Python
docs.python.org › 3 › library › pydoc.html
pydoc — Documentation generator and online help system ...
The built-in function help() invokes the online help system in the interactive interpreter, which uses pydoc to generate its documentation as text on the console. The same text documentation can also be viewed from outside the Python interpreter by running pydoc as a script at the operating system’s command prompt.
🌐
Ned Batchelder
nedbatchelder.com › blog › 201312 › versioned_python_commands_on_mac
Versioned Python commands on Mac | Ned Batchelder
December 15, 2013 - So this finder is given “/usr/bin/pydoc” as an argument, and it decides what to really run. It’s special-casing “/usr/bin”, and actually invoking /usr/bin/pydoc2.7.
Find elsewhere
🌐
Unix.com
unix.com › man-page › osx › 1 › PYDOC
pydoc(1) [osx man page] - The UNIX and Linux Forums
pydoc shows text documentation on something related to python(1). The name argument may be the name of a Python keyword, topic, function, module, or package, or a dotted reference to a class or function within a module or module i
🌐
PyPI
pypi.org › project › pydoc-markdown
pydoc-markdown · PyPI
You need at least Python 3.7 to run Pydoc-Markdown.
🌐
Packtpub
subscription.packtpub.com › book › programming › 9781783280971 › 18 › ch18lvl1sec164 › using-pydoc-for-documentation
Using pydoc for documentation
Either command will create text documentation based on the Python code. The output will be displayed with programs such as less (on Linux or Mac OS X) or more (on Windows) that paginate the long stream of output.
🌐
Apple Community
discussions.apple.com › thread › 253856975
How do you use pydoc to create Python htm… - Apple Community
April 27, 2022 - How do you use pydoc to create Python html documentation on a Mac?
🌐
University of Texas
cs.utexas.edu › ~fares › cs330ef19 › CS 373_files › started.html
Utexas
After installing Python, you need to inform Windows where to find Python by updating the system environment variables. To access and update system environment variables: Got to: Control panel > System and Security > System > Advanced System settings > Advanced > Environment variables System ...
🌐
Packtpub
subscription.packtpub.com › book › application_development › 9781783280971 › 18 › ch18lvl1sec164 › using-pydoc-for-documentation
Quality and Documentation | Mastering Object-oriented Python
Either command will create text documentation based on the Python code. The output will be displayed with programs such as less (on Linux or Mac OS X) or more (on Windows) that paginate the long stream of output.
🌐
GitHub
gist.github.com › 1639137
Install a copy of pydoc in your local directory · GitHub
Install a copy of pydoc in your local directory · Raw · get_pydoc.py · This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
🌐
Anaconda.org
anaconda.org › conda-forge › pydoc-markdown
pydoc-markdown - conda-forge | Anaconda.org
Copied fromcf-staging / pydoc-markdown · Overview · Files 7 · Labels 1 · Badges · Versions · 4.5.0 · To install this package, run one of the following: $conda install conda-forge::pydoc-markdown · Choose a pre-made example or create your own: Monthly ·
🌐
GitHub
github.com › Bears-R-Us › arkouda › blob › master › pydoc › setup › MAC_INSTALL.md
arkouda/pydoc/setup/MAC_INSTALL.md at master · Bears-R-Us/arkouda
/opt/homebrew/Caskroom/anaconda/2022.10/Anaconda3-2022.10-MacOSX-arm64.sh # initialize conda conda init # User conda env conda env create -f arkouda-env.yml conda activate arkouda # Developer conda env conda env create -f arkouda-env-dev.yml conda activate arkouda-dev # Install the Arkouda Client Package and add it to your PYTHONPATH.
Author: Bears-R-Us