sphinx-fortran icon indicating copy to clipboard operation
sphinx-fortran copied to clipboard

cannot import extention

Open zengtianli opened this issue 5 years ago • 1 comments

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))

zengtianli avatar Jul 19 '19 01:07 zengtianli

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/

ndarmage avatar Apr 09 '21 12:04 ndarmage