`ModuleNotFoundError: No module named 'six'` on build
See original GitHub issueDetails
I tried building my docs for my project, yet this fails with a ModuleNotFoundError
Expected Result
A successful build
Actual Result
The following error:
Running Sphinx v3.3.1
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/config.py", line 319, in eval_config_file
execfile_(filename, namespace)
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 89, in execfile_
exec(code, _globals)
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/checkouts/latest/docs/source/conf.py", line 82, in <module>
from six import string_types
ModuleNotFoundError: No module named 'six'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/cmd/build.py", line 279, in build_main
args.tags, args.verbosity, args.jobs, args.keep_going)
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/application.py", line 219, in __init__
self.config = Config.read(self.confdir, confoverrides or {}, self.tags)
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/config.py", line 174, in read
namespace = eval_config_file(filename, tags)
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/config.py", line 332, in eval_config_file
raise ConfigError(msg % traceback.format_exc()) from exc
sphinx.errors.ConfigError: There is a programmable error in your configuration file:
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/config.py", line 319, in eval_config_file
execfile_(filename, namespace)
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 89, in execfile_
exec(code, _globals)
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/checkouts/latest/docs/source/conf.py", line 82, in <module>
from six import string_types
ModuleNotFoundError: No module named 'six'
Configuration error:
There is a programmable error in your configuration file:
Traceback (most recent call last):
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/config.py", line 319, in eval_config_file
execfile_(filename, namespace)
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/envs/latest/lib/python3.7/site-packages/sphinx/util/pycompat.py", line 89, in execfile_
exec(code, _globals)
File "/home/docs/checkouts/readthedocs.org/user_builds/dblstats/checkouts/latest/docs/source/conf.py", line 82, in <module>
from six import string_types
ModuleNotFoundError: No module named 'six'
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:15 (6 by maintainers)
Top Results From Across the Web
ImportError: No module named six - python - Stack Overflow
With apt-get install python3-six I get "newest version" but with ipython I get ModuleNotFoundError: No module named 'six' . In /usr/lib/python3/dist-packages/ , ...
Read more >ModuleNotFoundError: No module named 'six' in Python
The Python "ModuleNotFoundError: No module named 'six'" occurs when we forget to install the six module before importing it or install it in ......
Read more >Python - ModuleNotFoundError: No module named 'six' [Solved]
The ModuleNotFoundError: No module named 'six' error occurs one of the following reasons: Using the six module without installing it. Installed ...
Read more >How to Solve modulenotfounderror no module named six
modulenotfounderror no module named is one of the most famous errors in Python. This type of error appears when the program can't import...
Read more >ImportError: No module named six - SyntaxFix
I'm trying to build OpenERP project, done with dependencies. It's giving this error now. Traceback (most recent call last): File "openerp-client.py", ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Hi, I had the same issue. At first, I followed the recommendation https://github.com/readthedocs/readthedocs.org/issues/7704#issuecomment-735030431 but it was not complete without specifying requirements in the settings.
Solved
Here is how I solved it, first follow https://github.com/readthedocs/readthedocs.org/issues/7704#issuecomment-735030431, and then click Admin, Advanced Settings and then under the section Requirements file add the file path you created docs/requirements.txt. Click on Save and build Version. I hope this works out for you.
Cheers.
Hi all! I deployed a quick fix for now that does not install latest
sphinx
version by default (3.3.1) but the previous one that Read the Docs pinned for years (1.8.x).We enabled this feature (
USE_LATEST_SPHINX
for new projects) to start testing the builder with this new version of Sphinx, but we didn’t realize thatsix
was not a dependency anymore. So, for now, I disabled this feature and your builds will usesphinx==1.8.x
by default. If you want to use a different version of Sphinx, please specify it in yourrequirements.txt
file as usual.We will have a fix for this soon and we will re-enable
USE_LATEST_SPHINX
version for new projects.