1. Install the google-cloud-bigquery library:

If you haven’t already, install the library using pip:
pip install google-cloud-bigquery

2. Upgrade the library (if needed):

pip install --upgrade google-cloud-bigquery

3. Activate virtual environment (if applicable):

If you’re using a virtual environment, make sure it’s activated before running your code. The google-cloud-bigquery library needs to be installed within the active environment for it to be recognized.

4. Check import statement:

Double-check your import statement. It should be:

from google.cloud import bigquery

If the pip not worked then use pip3:
Failed - pip3 install --upgrade google-cloud
Worked - pip3 install --upgrade google-cloud-bigquery
Worked - pip3 install --upgrade google-cloud-storage

Support On Demand!