documentation
documentation copied to clipboard
Issue with pip install command
URL to the relevant documentation
https://docs.quantum.ibm.com/guides/install-qiskit#local
Select all that apply
- [ ] typo
- [x] code bug
- [ ] out-of-date content
- [ ] broken link
- [ ] other
Describe the fix.
The following command in the page doesnt work on mac: pip install qiskit[visualization] Instead the following works: pip install 'qiskit[visualization]'
Thanks for taking the time to open an issue! That's really helpful feedback.
We should update the content to always use quotes for this install, whereas right now they only show up in the 'zsh' tab. There is no downside to always using quotes, and it would reduce the risk of misunderstanding.
FYI, the quotes don't work on Windows, at least in JupyterLab:
The quotes don't work in the command prompt either:
C:\1docs.venv>pip install 'qiskit[visualization]' WARNING: Ignoring invalid distribution ~ip (C:\Python312\Lib\site-packages)
[notice] A new release of pip is available: 24.3.1 -> 25.0.1 [notice] To update, run: python.exe -m pip install --upgrade pip ERROR: Invalid requirement: "'qiskit[visualization]'": Expected package name at the start of dependency specifier 'qiskit[visualization]' ^
C:\1docs.venv>
In the install guide we have a tab that shows the way you need to do it with a zsh shell (i.e. the 'qiskit[visualizaton]' way. I think to address this issue we should rename the tabs to be more specific, so change them to be:
- "bash" which uses the
'qiskit[visualizaton]'way - "windows" which uses the other way
Or maybe "macOS/Linux" vs "Windows"? Many Unix (macOs/Linux) users use other shells than Bash, like how Zsh is the default on macOS. We could use OperatingSystemTabs? https://github.com/Qiskit/documentation/blob/main/mdx-guide.md#tabs
Is it possible we're overthinking this? How about a single line that says (maybe as a code comment), "Depending on your OS and shell, you might not need quotes in this install line" and include the version with quotes. Otherwise we may find ourselves in a situation where the requirement changes for the OS or the shell, and then we have to maintain that somehow.