diff --git a/qiskit_ibm_runtime/api/session.py b/qiskit_ibm_runtime/api/session.py index d2e0b221b..9972c1096 100644 --- a/qiskit_ibm_runtime/api/session.py +++ b/qiskit_ibm_runtime/api/session.py @@ -19,7 +19,7 @@ import sys from typing import Dict, Optional, Any, Tuple, Union from pathlib import PurePath -import pkg_resources +import importlib.metadata from requests import Session, RequestException, Response from requests.adapters import HTTPAdapter @@ -74,7 +74,7 @@ def _get_client_header() -> str: pkg_versions = {"qiskit_ibm_runtime": f"qiskit_ibm_runtime-{ibm_runtime_version}"} for pkg_name in qiskit_pkgs: try: - version_info = f"{pkg_name}-{pkg_resources.get_distribution(pkg_name).version}" + version_info = f"{pkg_name}-{importlib.metadata.version(pkg_name)}" if pkg_name in sys.modules: version_info += "*" diff --git a/requirements-dev.txt b/requirements-dev.txt index 7236cd015..0218c540d 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -13,7 +13,6 @@ black~=22.0 coverage>=6.3 pylatexenc scikit-learn -setuptools ddt>=1.2.0,!=1.4.0,!=1.4.3 # Documentation