missing `ipykernel` requirement
dlyongemallo opened this issue · 5 comments
Using Ubuntu 22.04.3 LTS. pip
version is 22.0.2.
Steps to repro:
- clone pytket into a new directory (
git clone https://github.com/CQCL/pytket
) - set up a clean virtual environment (e.g.,
python3 -m venv .venv
) - run
./build-manual
Expected: requirements are installed and the manual is built successfully
Actual: No module named 'pytket.circuit'
The error message is actually a red herring. The build-manual
script actually does install pytket
into the current environment, but the sphinx-build
does not recognise it. (It's possible to bypass the error by installing pytket
outside the virtual environment. But then this leads to a series of other error messages like ModuleNotFoundError: No module named 'pytket.extensions.qiskit'
.)
The real fix is to pip install ipykernel
. When this is missing, sphinx-build
seems not to recognise the virtual environment.
(Also, running build-manual
requires graphviz
to be installed. But at least the error message there is clear: ExecutableNotFound: failed to execute PosixPath('dot'), make sure the Graphviz executables are on your systems' PATH
.)
Incidentally: what is the reason for the duplication in the manual/build
and docs/manual
subdirectories? I noticed that the last step of build-manual
just copies manual/build
into docs/manual
, and both are in .gitignore
. Would it be better if a temporary directory (such as returned by mktemp
) were used instead?
Thank you for pointing this out.
Indeed, ipykernel
is required. I've been restructuring some of the docs recently and must've removed ipykernel
by accident. I'll make a note to fix that.
There is also some duplication of directories as you point out. I don't think there was an expecially good reason from this. Do you know differently @cqc-melf ?
Previously we deployed the whole docs/manual directory but this was deleted in #268.
Our docs build/deployment is a bit untidy at the moment but I'm in the process of consolidating docs at https://tket.quantinuum.com.
As @CalMacCQ we are currently in the process of restructuring how the manual is build and deployed.
For me this is still working, there are some additional steps required at the moment to get that to work, you can find them in the github workflow file at https://github.com/CQCL/pytket/blob/main/.github/workflows/check-manual.yml#L44C13-L44C13
If you need more help with the, or that is still not working, please let us know.