1

Just installed Ubuntu 18.04.2 LTS on a fresh virtual box this morning and I'm trying to re-invigorate a project I had running on my legacy VBox/Ubuntu environment. I'm stumbling with getting sphinx auto documentation working on the new VBox. Before installing sphinx, I added this to .bashrc to execute python3 by default:

alias python=python3

My method of installing sphinx follows usual procedures:

pip3 install Sphinx

The trouble is experienced at the first step of the Sphinx tutorial in setting up a project:

[user@robot][~]$ sphinx-quickstart
Traceback (most recent call last):
  File "/usr/bin/sphinx-quickstart", line 14, in <module>
    from sphinx.quickstart import main
ModuleNotFoundError: No module named 'sphinx.quickstart'

Anyone experienced something similar? Given the fresh install environment, I'm anticipating there's something incorrect in my configuration.

Related: sphinx-build fail - autodoc can't import/find module

mzjn
  • 48,958
  • 13
  • 128
  • 248
Danlger
  • 143
  • 1
  • 1
  • 7

1 Answers1

0

Got things finally working with the following:

pip3 uninstall sphinx
sudo su
cd ~
umask 022
pip3 install sphinx

Here are a few references that will help the next person:

https://stackoverflow.com/a/26941559/9008686

https://stackoverflow.com/a/53117242/9008686

Danlger
  • 143
  • 1
  • 1
  • 7
  • 1
    You should never `sudo` to install Python packages. Always use a virtual environment. `mkdir ~/projects/myproject; cd ~/projects/myproject; python3 -m venv env; env/bin/pip install sphinx` – Steve Piercy Mar 31 '19 at 02:29