It may be possible that the pip used in COMMAND prompt is not installing in the same place, as the place your IDE is looking for packages.
Your need to provide more details here: what IDE are your using? what system are you using?
Yes, we see this problem constantly. Pycharm creates a virtual environment for the project, and expects to manage that environment for you. You should use Pycharm’s interface in order to install third-party libraries like Qiskit into that environment.
You’ll find several ways to manage Python packages in PyCharm in the online documentation:
Another (more convenient IMO) way to manage Python packages is to use the terminal emulator directly in PyCharm (see Terminal emulator | PyCharm Documentation).
To put it simply, any command you type there (pip install ... for example) will only affect the virtual environment associated to your project. When running a script from PyCharm’s terminal emulator, or from the graphical interface, your project’s environment will be used.
I cannot suggest alternative IDEs, but PyCharm is for sure quite heavy machinery. It’s really well-suited for large projects, or integration with version-control systems, but might not be the best option for beginners.
The version of python and pip
(cwq) APLXXXXXXXX:~ RTEWV$ python --version
Python 3.12.4
(cwq) APLXXXXXXXX:~ RTEWV$ pip --version
pip 24.0 from /Users/RTEWV/.conda/envs/cwq/lib/python3.12/site-packages/pip (python 3.12)
I am not able to install the qiskit by specifying the version as well. I am not clear from where PIP pick up the qiskit version. Any help on this will be appreciated.