Default to __version__ attribute for __qiskit_version__ (#2652)
Default to __version__ attribute for __qiskit_version__ (#2652)

* Default to __version__ attribute for __qiskit_version__

This commit changes the behavior slightly for the
qiskit.__qiskit_version__ attribute. Previously we relied solely on pip
to extract the version information for installed packages. However, in
some situtations this can get out of sync with the actual version of the
package. To address this potential issue this commit adds a first round
check to use the attributes from the installed packages. If it doesn't
work then we look at the pip data as a fallback (because we have to use
pip anyway for the meta-package which doesn't contain any python code).

Fixes #2494

* Fix lint

QISKit/qiskit-sdk-py,QISKit/qiskit-sdk-py,QISKit/qiskit-sdk-py