error showing all links of an Intersphinx mapping file

39 views
Skip to first unread message

Ron Stone

unread,
Feb 10, 2021, 7:30:03 PM2/10/21
to sphinx-users
Hi,

I am not able to dump the contents of an objects.inv file as described at https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html:

$ python -msphinx.ext.intersphinx build/html/objects.inv

(snip) Error while finding module specification for 'sphinx.ext.intersphinx' (ModuleNotFoundError: No module named 'sphinx')

I get the same module not found error on two machines

- sphinx on macOS installed via:
brew install sphinx
- sphinx on Win10 installed via:
pip install -U sphinx

Sphinx otherwise works as expected.

Any help with this appreciated.

Nick Volynkin

unread,
Feb 11, 2021, 12:55:43 AM2/11/21
to sphinx...@googlegroups.com
Hi Ron

It's best to install Python modules for some particular project in a virtual environment. Try this:

brew install pyenv-virtualenv

cd your-project-directory
# create a subdirectory for virtual environment
virtualenv .venv
# activate it in current terminal session
source .venv/bin/activate
# check that we're now using local Python:
which python
python --version
# if you have your project's requirements in a file, install them from it:
pip install -r requirements.txt
# or just install sphinx
pip install sphinx

# now it should work
python -msphinx.ext.intersphinx build/html/objects.inv

--
You received this message because you are subscribed to the Google Groups "sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/84a82099-3c0a-4315-8c10-f0ae81c84716n%40googlegroups.com.


--
Best regards,
Nick Volynkin
Technical writer, Plesk
Program commitee member, KnowledgeConf
Community moderator, Stack Overflow in Russian
Reply all
Reply to author
Forward
0 new messages