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

cannot import extention #19

Open
zengtianli opened this issue Jul 19, 2019 · 1 comment
Open

cannot import extention #19

zengtianli opened this issue Jul 19, 2019 · 1 comment

Comments

@zengtianli
Copy link

PC configuration:
OS ubuntu 16.04

I read some blogs about it includes:
google groups(https://groups.google.com/forum/#!topic/sphinx-users/gQfMxDsXQo0)
read the file(https://sphinx-fortran.readthedocs.io/en/latest/)
and related GitHub
I found it hasn't update for a while, is it still compatible with the new version's sphinx?
It is because I cannot import extensions like sphinxfortran.fortran_domain, sphinxfortran.fortran_autodoc in conf.py

the error message is:
Running Sphinx v2.1.2

Extension error:
Could not import extension sphinxfortran.fortran_autodoc (exception: cannot import name 'Directive' from 'sphinx.directives' (unknown location))

Running Sphinx v2.1.2

Extension error:
Could not import extension sphinxfortran.fortran_domain (exception: cannot import name 'Directive' from 'sphinx.util.compat' (/home/tianli/anaconda3/lib/python3.7/site-packages/sphinx/util/compat.py))

@ndarmage
Copy link

ndarmage commented Apr 9, 2021

I am using the extension successfully with sphinx v.3.5.3 (OS Win10 and CentOS7).

extensions = [
'sphinx.ext.autodoc',
...
'sphinxcontrib.bibtex',
'sphinx.ext.mathjax',
'sphinxfortran.fortran_domain',
'sphinxfortran.fortran_autodoc'
] # from my conf.py

installed from
https://pypi.org/project/sphinx-fortran/

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

No branches or pull requests

2 participants