Skip to content
This repository was archived by the owner on Feb 23, 2026. It is now read-only.
This repository was archived by the owner on Feb 23, 2026. It is now read-only.

ModuleNotFoundError: No module named 'packaging' #848

Closed

Description

@jmctune

Thanks for stopping by to let us know something could be better!

PLEASE READ: If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.

Please run down the following list and make sure you've tried the usual "quick fixes":

If you are still having issues, please be sure to include as much information as possible:

Environment details

  • OS type and version: Windows 11
  • Python version: python --version Python 3.11.3
  • pip version: pip --version pip 22.3.1
  • google-api-core version: pip show google-api-core 2.28.0

Steps to reproduce

The google-api-python-client library requires this library to function. There was a new tag a few hours ago that introduced some changes to the way versioning is being done: d36e896. It doesn't look like the packaging library is being installed as I am getting an error when trying to use the google-api-python-client library.

Stack trace

  File "---\app\common\translators\googletranslate.py", line 2, in <module>
    from googleapiclient.discovery import build
  File "---\app\venv\Lib\site-packages\googleapiclient\discovery.py", line 42, in <module>
    import google.api_core.client_options
  File "---\app\venv\Lib\site-packages\google\api_core\__init__.py", line 20, in <module>
    from google.api_core import _python_package_support
  File "---\app\venv\Lib\site-packages\google\api_core\_python_package_support.py", line 28, in <module>
    from packaging.version import parse as parse_version
ModuleNotFoundError: No module named 'packaging'

Making sure to follow these steps will guarantee the quickest resolution possible.

Thanks!

Activity

  1. hayeshaus commented on Oct 28, 2025

    @hayeshaus

    We are also experiencing the same issue:

    
    File "/usr/local/lib/python3.10/site-packages/simple_gcp_object_downloader/download_gcp_object.py", line 2, in <module> from google.cloud import storage 
    File "/usr/local/lib/python3.10/site-packages/google/cloud/storage/__init__.py", line 35, in <module> from google.cloud.storage.batch import Batch 
    File "/usr/local/lib/python3.10/site-packages/google/cloud/storage/batch.py", line 43, in <module> from google.cloud import exceptions 
    File "/usr/local/lib/python3.10/site-packages/google/cloud/exceptions/__init__.py", line 24, in <module> from google.api_core import exceptions 
    File "/usr/local/lib/python3.10/site-packages/google/api_core/__init__.py", line 20, in <module> from google.api_core import _python_package_support 
    File "/usr/local/lib/python3.10/site-packages/google/api_core/_python_package_support.py", line 28, in <module> from packaging.version import parse as parse_version 
    ModuleNotFoundError: No module named 'packaging' 
    
  2. jmctune commented on Oct 28, 2025

    @jmctune
    Author

    As a workaround, you can pin to the previous version of this library until this is fixed:

    google-api-core==2.27.0
    
  3. aaron-tillekeratne commented on Oct 28, 2025

    @aaron-tillekeratne

    same issue, used @jmctune's workaround for now

  4. noahbuttner commented on Oct 28, 2025

    @noahbuttner

    Same issue:

      File "/builds/nuseds/nuseds-tools/calendar_sync/main.py", line 15, in <module>
        from googleapiclient.discovery import build
      File "/usr/local/lib/python3.14/site-packages/googleapiclient/discovery.py", line 42, in <module>
        import google.api_core.client_options
      File "/usr/local/lib/python3.14/site-packages/google/api_core/__init__.py", line 20, in <module>
        from google.api_core import _python_package_support
      File "/usr/local/lib/python3.14/site-packages/google/api_core/_python_package_support.py", line 28, in <module>
        from packaging.version import parse as parse_version
    ModuleNotFoundError: No module named 'packaging'
    
  5. pierrotsmnrd commented on Oct 28, 2025

    @pierrotsmnrd

    This can also be fixed by installing packaging==25.0

    Environment details:

    • OS type and version: MacOS 15.5
    • Python version: 3.12.12
    • pip version: 25.2
    • google-api-core version: 2.28.0
  6. thanasis457 commented on Oct 28, 2025

    @thanasis457

    Same here. Version 2.28 does not install packaging which means you either have to revert to version 2.27 or install the packaging module.

  7. added
    type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.
    priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.
    on Oct 28, 2025
  8. anilkumarmyla commented on Oct 28, 2025

    @anilkumarmyla

    2.28.1 Fixes this issue 🎉

  9. Molkree commented on Oct 29, 2025

    @Molkree

    @parthea @daniel-sanche can you please yank 2.28.0 on PyPI now that 2.28.1 was released?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions