sphinx-contrib / video

A sphinx plugin that enables embedding of HTML5 videos
https://sphinxcontrib-video.readthedocs.io
Apache License 2.0
43 stars 29 forks source link

Could not import extension sphinxcontrib.video (exception: No module named 'sphinxcontrib.video') #35

Open Elodie-Praxinos opened 9 months ago

Elodie-Praxinos commented 9 months ago

Hello,

I've followed the procedure to install sphinxcontrib.video, but it's not working.

When I installed it:

imac-de-test:~ elodie$ pip install sphinxcontrib-video
Defaulting to user installation because normal site-packages is not writeable
Collecting sphinxcontrib-video
  Downloading sphinxcontrib_video-0.2.0-py3-none-any.whl (9.0 kB)
Requirement already satisfied: sphinx in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinxcontrib-video) (4.5.0)
Requirement already satisfied: sphinxcontrib-jsmath in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (1.0.1)
Requirement already satisfied: imagesize in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (1.3.0)
Requirement already satisfied: sphinxcontrib-applehelp in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (1.0.2)
Requirement already satisfied: sphinxcontrib-serializinghtml>=1.1.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (1.1.5)
Requirement already satisfied: docutils<0.18,>=0.14 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (0.17.1)
Requirement already satisfied: babel>=1.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (2.9.1)
Requirement already satisfied: alabaster<0.8,>=0.7 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (0.7.12)
Requirement already satisfied: sphinxcontrib-devhelp in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (1.0.2)
Requirement already satisfied: packaging in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (21.3)
Requirement already satisfied: requests>=2.5.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (2.27.1)
Requirement already satisfied: sphinxcontrib-htmlhelp>=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (2.0.0)
Requirement already satisfied: sphinxcontrib-qthelp in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (1.0.3)
Requirement already satisfied: Jinja2>=2.3 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (3.1.1)
Requirement already satisfied: snowballstemmer>=1.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (2.2.0)
Requirement already satisfied: Pygments>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from sphinx->sphinxcontrib-video) (2.11.2)
Requirement already satisfied: pytz>=2015.7 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from babel>=1.3->sphinx->sphinxcontrib-video) (2022.1)
Requirement already satisfied: MarkupSafe>=2.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from Jinja2>=2.3->sphinx->sphinxcontrib-video) (2.1.1)
Requirement already satisfied: urllib3<1.27,>=1.21.1 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests>=2.5.0->sphinx->sphinxcontrib-video) (1.26.9)
Requirement already satisfied: idna<4,>=2.5 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests>=2.5.0->sphinx->sphinxcontrib-video) (3.3)
Requirement already satisfied: certifi>=2017.4.17 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests>=2.5.0->sphinx->sphinxcontrib-video) (2021.10.8)
Requirement already satisfied: charset-normalizer~=2.0.0 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from requests>=2.5.0->sphinx->sphinxcontrib-video) (2.0.12)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages (from packaging->sphinx->sphinxcontrib-video) (3.0.8)
Installing collected packages: sphinxcontrib-video
Successfully installed sphinxcontrib-video-0.2.0

My config.py does include sphinxcontrib.video in "extension".

And here is the error when I build the doc:

Extension error:
Could not import extension sphinxcontrib.video (exception: No module named 'sphinxcontrib.video')
make: *** [html] Error 2
[1]+  Done                    rm -rf ./build
imac-de-test:Doc elodie$ 

Thank you in advance!

schienstockd commented 3 months ago

Same here.

12rambau commented 3 months ago

I don't face this from my side can you share more detail so I can debug it ?

sgaechter commented 1 month ago

I had the same issue on a windows environment.

The Problem on my site was, that I installed the package into my "appdata" directory by not using CMD as Administrator.

After uninstalling by "pip uninstall sphinxcontrib-video" and running CMD as Admin and Reinstalling the package by "pip install sphinxcontrib-video" the extension was found by sphinx.

Versions: sphinxcontrib-video==0.2.0 Python==3.12.3 Sphinx==7.3.7

conf.py: extensions = [ "sphinxcontrib.video", ]

RST-integration: .. video:: _media/Experimentalaufbau.mp4

Error causing on make HTML:

`Running Sphinx v7.3.7 loading translations [de]... done

Extension error before installing as Admin: Could not import extension sphinxcontrib.video (exception: No module named 'sphinxcontrib.video')`

12rambau commented 3 weeks ago

Can you try again against v0.2.2 ? I change the structure of the folders to match perfectly with other existing libs. Test and Docs build continue to work fine from my side.