Issue when build an extension

Hi all,
We’re trying to build the extension and publish it to extension Manager.
It’s a Python base extension and I’m following the steps in this link for Windows.
Extensions — 3D Slicer documentation
I’m having trouble understand this step:
* Specify Slicer_DIRby replacingSlicer_DIR-NOTFOUNDby the Slicer inner-build folder (for examplec:/D/SD/Slicer-build).
I think it is required to build Slicer from source code, but in another part of the doc, we have this:

If developing modules in Python only, then it is not necessary to build the extension.

So do I need to build Slicer from source code?
I was trying to do it but couldn’t find the link to download and setup qt correctly.
Please help on this topic.
Thank you!!!

As I recall, you need to have a fully built local Slicer in order to package an extension for redistribution, but if you are just developing and only using python you don’t need that step. If your are going to submit to the slicer extension index then packaging will happen on the Slicer factory machine build trees.

This note is in the Build an extension section of the documentation and means that you can develop, use, and test Python modules without building anything. However, if you want to build and extension package, you still need to built Slicer, as the packaging infrastructure relies on having a complete build tree of Slicer.

I agree that it would be nice to have a way to create packages of Python-only extensions. Feel free to submit a feature request for this (by creating a new topic in the Feature requests category) and as more people vote on it, it will get higher on the priority list.

Thank you for the answer. I’m trying to download Qt 5.15.2 but not sure which one I should download from this list. Can you comment on that?

Based on the screenshot, it looks you are on a web page regarding embedded linux, instead I suggest you do the following:

  1. Go to Build Instructions — 3D Slicer documentation
  2. Click on the Install prerequisites or Prerequisites corresponding to your platform
  3. Click on the link related to Qt

Thank you Jean.
I followed the instruction on the link, for Qt, here is the screenshot. Slicer required Qt 5.15.2.

The link get me to Online Qt installer, which is currently Qt version 6 only.
For offline installer, they only provided link for 5.14 and lower, as per this annoucement.
Do you or anyone have the offline installer for Qt 5.15?

Correction from this post: The current online installer has 5.15 and Qt 6.xx. I will try this and update you guys if successful.

1 Like