diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5bdb174ef..9024929f5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -44,7 +44,6 @@ jobs: - name: Set up conda uses: conda-incubator/setup-miniconda@v2 with: - python-version: ${{ matrix.py }} channels: conda-forge, defaults channel-priority: strict show-channel-urls: true diff --git a/pyccl/__init__.py b/pyccl/__init__.py index ea581ca89..0103fce39 100644 --- a/pyccl/__init__.py +++ b/pyccl/__init__.py @@ -1,11 +1,11 @@ # flake8: noqa E402 -from pkg_resources import get_distribution, DistributionNotFound +from importlib.metadata import version, PackageNotFoundError try: - __version__ = get_distribution(__name__).version -except DistributionNotFound: + __version__ = version(__name__) +except PackageNotFoundError: # package is not installed pass -del get_distribution, DistributionNotFound +del version, PackageNotFoundError # Set the environment variable for default config path from os import environ, path