Expand C install guide#5327
Conversation
|
One or more of the following people are relevant to this code:
|
|
@beckykd Thank you Becky for this awesome work! If you are OK with, can I trim windows part a little by make some details collapsible? |
|
|
||
| This section builds the standalone C library, which is only needed if you want to compile and link pure C programs as in the UNIX-like section. In addition to the Step 1 prerequisites, this requires the following tools: | ||
|
|
||
| * A Rust compiler: see for example the [guide on installing Qiskit from source](https://github.com/Qiskit/qiskit/blob/main/CONTRIBUTING.md#installing-qiskit-from-source) |
There was a problem hiding this comment.
Just a note that I was about to recommend pointing to https://quantum.cloud.ibm.com/docs/guides/install-qiskit-source instead, but it doesn't look like it goes into much detail for the Rust compiler part. We might want to consider beefing up the guide to include this? cc: @kaelynj
| Run `pip install qiskit-aer --only-binary=:all:`. If that also fails, use Python 3.12 or skip aer, which is optional | ||
| </AccordionItem> | ||
| <AccordionItem title="Build runs but import fails with a version error"> | ||
| Build and runtime Qiskit must share a minor version. Reinstall with `pip install "qiskit~=2.4.2"` |
There was a problem hiding this comment.
What are "Build and runtime Qiskit"?
There was a problem hiding this comment.
Oooh - good catch. Investigating.
There was a problem hiding this comment.
The Qiskit you compile the extension against (build time) and the Qiskit you run it with (runtime) must be the same minor version. If you met the version error, reinstall the exact version you built against — check it with pip show qiskit, then pip install "qiskit==<that-version>".
abbycross
left a comment
There was a problem hiding this comment.
I see a lot of -> that would render better if we replace them all with →
Co-authored-by: abbycross <across@us.ibm.com>
Co-authored-by: abbycross <across@us.ibm.com>
| Run `pip install qiskit-aer --only-binary=:all:`. If that also fails, use Python 3.12 or skip aer, which is optional | ||
| </AccordionItem> | ||
| <AccordionItem title="Build runs but import fails with a version error"> | ||
| Build and runtime Qiskit must share a minor version. Reinstall with `pip install "qiskit~=2.4.2"` |
There was a problem hiding this comment.
| Build and runtime Qiskit must share a minor version. Reinstall with `pip install "qiskit~=2.4.2"` | |
| Be sure the the version for compiling (build time) and runtime version are the same minor version. Reinstall with `pip install "qiskit~=2.4.2"` |
Closes #5294
Review these files:
https://qiskit.github.io/documentation/pr-5327/docs/guides/c-extension-for-python
https://qiskit.github.io/documentation/pr-5327/docs/guides/install-c-api