Python: No module named sphinx error


I have followed following <a href="https://docs.readthedocs.io/en/latest/getting_started.html" rel="nofollow">guide</a>.

$ pip install sphinx sphinx-autobuild $ pip freeze | grep "sphinx" sphinx-autobuild==0.6.0 sphinxcontrib-websupport==1.0.0 $ cd docs $ sphinx-quickstart $ make html

make html gives following error:

/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/MacOS/Python: No module named sphinx make: *** [help] Error 1

<strong>[Q]</strong> How could I prevent this error from happening?

Thank you for your valuable time and help.


First, don't install anything into your system's Python. Use either a virtual environment or your system's user installs to isolate packages from the system Python. The Python Packaging Authority provides an explanation of <a href="https://packaging.python.org/installing/#creating-virtual-environments" rel="nofollow">why virtual environments are a good idea™</a>.

I prefer to start by installing another version of Python on my system, either using the <a href="https://www.python.org/downloads/mac-osx/" rel="nofollow">official installers for macOS</a> (beginner) or <a href="https://github.com/pyenv/pyenv" rel="nofollow">pyenv</a> (not beginner). Install Python 3.x unless you absolutely must use Python 2.

Next <a href="https://packaging.python.org/installing/#requirements-for-installing-packages" rel="nofollow">install or upgrade your Python's packaging tools</a>. This is one of the very rare times that I install or upgrade packages in my Pythons, although you may want to do so for your user.

Next <a href="https://packaging.python.org/installing/#creating-virtual-environments" rel="nofollow">create and use a virtual environment</a>.

Finally follow the <a href="http://www.sphinx-doc.org/en/stable/usage/installation.html" rel="nofollow">correct guide to install Sphinx</a> into your virtual environment and get started using Sphinx.


I had the same issue, and I thought it might be helpful to share the solution I found.

Open the <strong>Makefile</strong> file, and change the following line:

SPHINXBUILD = python -msphinx

To this one:

SPHINXBUILD = python3 -msphinx


  • Do not autocomplete certain extensions from file names in shell for vim
  • first mac app - push viewcontroller
  • Ho do I capture ctrl + click on MacOS with d3js
  • Install virtualenvwrapper for Python 2.7 and 3.6 simultaneously
  • PHP strptime format bug?
  • How do I increase font size in RStudio Help pane?
  • R and RStudio don't display greek letters and other symbols - display squares instead
  • Determine if Finder can be safely killed
  • How do I create an image and save it for later to draw as texture in XNA?
  • What is the equivalent of Android permissions in iOS development? [duplicate]
  • Changing media screen makes div overlay
  • Cannot find “Grammar.txt” in python-sphinx
  • jersey/tomcat Description The origin server did not find a current representation for the target res
  • Consuming a WCF service in a Java Client using wsHttpBinding
  • What does “t” refer to in this SQL?
  • pip in virtualenv gets ConnectTimeoutError
  • CERN ROOT exporting data to plain text
  • Bash if statement with multiple conditions
  • During installation of Django, why do I keep getting ImportError: No module named django?
  • JBoss External Properties Files in Classpath
  • Tamper-proof configuration files in .NET?
  • gspread or such: help me get cell coordinates (not value)
  • Django simple Captcha “No module named fields” error
  • How do I exclude a dependency in provided scope when running in Maven test scope?
  • Is there a perl module to validate passwords stored in “{crypt}hashedpassword” “{ssha}hashedpassword
  • Why does access(2) check for real and not effective UID?
  • Meteor helpers not available in Angular template
  • req.body is undefined - nodejs
  • Why HTML5 Canvas with a larger size stretch a drawn line?
  • TFS: Get latest causes slow project reloading
  • Controls, properties, events and timers running in design time
  • Symfony2: How to get request parameter
  • Akka Routing: Reply's send to router ends up as dead letters
  • How do I rollback to a specific git commit
  • Is there a mandatory requirement to switch app.yaml?
  • using HTMLImports.whenReady not working in chrome
  • Hits per day in Google Big Query
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • Linking SubReports Without LinkChild/LinkMaster
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass