documentation icon indicating copy to clipboard operation
documentation copied to clipboard

visualization support instruction doesn't work

Open beckykd opened this issue 4 months ago • 5 comments

URL to the relevant tutorial

No response

Select all that apply

  • [ ] new content request
  • [ ] typo
  • [x] code bug
  • [ ] out-of-date content
  • [ ] broken link
  • [ ] other

Describe the fix or the content request.

Qiskit SDK 1.4 or later, with visualization support (pip install 'qiskit[visualization]')

Running that command with the single quotes doesn't work for me. I need to use pip install'qiskit[visualization]

For new content requests - if the request is accepted, do you want to write the content?

I will write (or already have written) a draft of the proposed content

beckykd avatar Aug 04 '25 21:08 beckykd

@beckykd we ended up deciding to either use tabs to specify the pip install command for windows vs non-windows machines. But if it ends up being too busy, maybe just write a note in parentheses.

kaelynj avatar Aug 07 '25 14:08 kaelynj

do we want to address this or leave it as is? Maybe we should just name the package requirements without installation instructions

miamico avatar Aug 26 '25 16:08 miamico

without installation instructions

That feels the least cumbersome to me.

beckykd avatar Sep 04 '25 17:09 beckykd

Just adding a note here for those who find this GitHub Issue via googling: the Qiskit installation guide at time of writing has some issues with the instruction to install the visualisation support for users on Apple's OS X operating system.

Problem & workaround

This is what is stated:

pip install qiskit[visualization]

If you get a zsh: no matches found: qiskit[visualization] message, try this instead:

pip install "qiskit[visualization]"

Reason

The zsh shell (the default on modern macOS) uses square brackets for "globbing," which is a way to match filenames. For example, ls file[123].txt would find file1.txt, file2.txt, etc.

When you type pip install qiskit[visualization], zsh looks for files in your current directory that match that pattern. When it finds none, it gives you the error: zsh: no matches found.

Wrapping the name in quotes prevents this by telling the shell, "Hey friend, don't try to be clever with this part, just pass it along as is."

ddri avatar Sep 27 '25 07:09 ddri

@beckykd bumping this. Do you think the solution above works?

miamico avatar Nov 24 '25 18:11 miamico