Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can not import sphinx_rtd_theme #618

Closed
efatuarte95 opened this issue Apr 23, 2018 · 17 comments · Fixed by #652
Closed

I can not import sphinx_rtd_theme #618

efatuarte95 opened this issue Apr 23, 2018 · 17 comments · Fixed by #652
Labels
Support Support question

Comments

@efatuarte95
Copy link

Problem

I've followed the installation manual, changing the html_theme in conf.py and when I'm going to create the html the following message comes out: "sphinx_rtd_theme is no longer a hard dependency since version 1.4.0. Please install it manually.(pip install sphinx_rtd_theme)"
Obviously I tried to install the theme manually but nothing changed... Any ideas?

Environment Info

  • Python Version: 2.7
  • Sphinx Version: 1.5.6
  • RTD Theme Version:
@Blendify Blendify added the Support Support question label Apr 23, 2018
@Blendify
Copy link
Member

Did pip install sphinx_rtd_theme give any error messages? I would also recommend updating sphinx to a newer version 1.5.6 is almost a year old.

@efatuarte95
Copy link
Author

I did pip install sphinx_rtd_theme and no errors appear. I've tried to update Sphinx to whe new version but still the same problem

@hning86
Copy link

hning86 commented May 20, 2018

any resolution? I ran into the exact same issue. I have sphinx 1.6.6.

@jessetan
Copy link
Contributor

I did pip install sphinx_rtd_theme and no errors appear

Can you post the output of this command?
Are you using a virtualenv?

@brunswyck
Copy link

brunswyck commented May 30, 2018

I had the same issue when I didn't have the sphinx package installed.
Doublecheck with
`(env) patrick@stretch:~$ pip list | grep -i "sphinx"

Sphinx 1.7.5
sphinx-autobuild 0.7.1
sphinx-rtd-theme 0.3.1
sphinxcontrib-websupport 1.0.1
(env) patrick@stretch:~$
`
I had the autobuild so I was under the illusion it was :-)

@Blendify
Copy link
Member

Blendify commented Jun 1, 2018 via email

@romangithub1024
Copy link

same issue

@davidfischer
Copy link
Contributor

I'm pretty sure the answer here is to add Sphinx to install_requires to setup.py.

The following is error free:

% virtualenv testvenv
% source testvenv/bin/activate
% pip install sphinx sphinx_rtd_theme
% python
>>> import sphinx_rtd_theme
>>>

@omushpapa
Copy link

Same issue

@Blendify
Copy link
Member

This should be fixed if people want to try to install master, otherwise, wait till the next release.

@dapplion
Copy link

For user still stuck with this issue, on macOS reinstalling the packages worked for me

pip uninstall sphinx sphinx_rtd_theme
pip install sphinx sphinx_rtd_theme

@MusikAnimal
Copy link

In my case on Ubuntu, I had python3-sphinx installed when I needed python-sphinx. I don't think this had anything to do with sphinx_rtd_theme, just a misleading error message.

@anwang2009
Copy link

I had incompatible sphinx packages sphinx-docfx-yaml 1.2.71 and sphinx 2.3.1. Uninstalling and reinstalling sphinx and its themes, then uninstalling sphinx-docfx-yaml worked for me.

@mjlabe
Copy link

mjlabe commented Apr 21, 2020

I'll add that even though Pycharm says it can't find the import, it still works when I build. 🤷

@zom-bee
Copy link

zom-bee commented May 29, 2020

I found another issue, I had two installations of sphinx, one via pip and another one via brew. Deleting one (I chose to remove brew) solved this issue.
brew remove sphinx-doc

@afkHub
Copy link

afkHub commented Jan 8, 2021

pip3 install sphinx sphinx_rtd_theme
I had the same problem. It is solved when I installed like this

@h3nr1ke
Copy link

h3nr1ke commented May 1, 2024

If you, for whatever reason, dont want to use pip, you can try

sudo apt-get install python3-sphinx python3-sphinx-rtd-theme

it will fix the problem as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Support Support question
Projects
None yet
Development

Successfully merging a pull request may close this issue.