python-bigquery-pandas: Import error with pandas_gbq

There’s a bug with the most recent google bigquery library. Hence, this error occurs in pandas-gbq

ImportError: pandas-gbq requires google-cloud-bigquery: cannot import name 'collections_abc'

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 2
  • Comments: 23 (5 by maintainers)

Most upvoted comments

If you’re in a notebook, you often have to restart the kernel to pick up any package changes.

You might want to try running importlib.reload(six) after the installation. See the docs for reload.

After reloading the module using importlib notebook is able to pick up 1.15.0 six. Thank you @tswast

If you’re in a notebook, you often have to restart the kernel to pick up any package changes.

You might want to try running importlib.reload(six) after the installation. See the docs for reload.

@aoliu95 what is the output of python -c 'import six ; print(six.__version__)'?

I suspect when you actually run Python it might not be getting the version of six that is listed here.

Root cause: The google-cloud-bigquery package depends on features in six >=1.13.0, but did not explicitly list this as a dependency. https://github.com/googleapis/google-cloud-python/issues/9965

To be fixed by https://github.com/googleapis/google-cloud-python/pull/9979

my package installed on the cloud: alabaster==0.7.10 anaconda-client==1.6.9 anaconda-navigator==1.7.0 anaconda-project==0.8.2 asn1crypto==0.24.0 astroid==1.6.1 astropy==2.0.3 attrs==17.4.0 Babel==2.5.3 backports-abc==0.5 backports.functools-lru-cache==1.6.1 backports.shutil-get-terminal-size==1.0.0 backports.ssl-match-hostname==3.5.0.1 beautifulsoup4==4.6.0 bitarray==0.8.1 bkcharts==0.2 blaze==0.11.3 bleach==2.1.2 bokeh==0.12.13 boto==2.48.0 Bottleneck==1.2.1 cachetools==3.1.1 cdecimal==2.3 certifi==2020.4.5.1 cffi==1.11.4 chardet==3.0.4 click==6.7 cloudpickle==0.5.2 clyent==1.2.2 colorama==0.3.9 conda==4.4.10 conda-build==3.4.1 conda-verify==2.0.0 configparser==3.5.0 contextlib2==0.5.5 cryptography==2.1.4 cycler==0.10.0 Cython==0.27.3 cytoolz==0.9.0 dask==0.16.1 datashape==0.5.4 decorator==4.2.1 distributed==1.20.2 docutils==0.14 entrypoints==0.2.3 enum34==1.1.10 et-xmlfile==1.0.1 fastcache==1.0.2 filelock==2.0.13 Flask==0.12.2 Flask-Cors==3.0.3 funcsigs==1.0.2 functools32==3.2.3.post2 futures==3.3.0 gevent==1.2.2 glob2==0.6 gmpy2==2.0.8 google-api-core==1.16.0 google-api-python-client==1.8.0 google-auth==1.13.1 google-auth-httplib2==0.0.3 google-auth-oauthlib==0.4.1 google-cloud-bigquery==1.24.0 google-cloud-core==1.3.0 google-cloud-dataproc==0.7.0 google-cloud-datastore==1.11.0 google-cloud-language==1.3.0 google-cloud-logging==1.15.0 google-cloud-spanner==1.14.0 google-cloud-storage==1.26.0 google-cloud-translate==2.0.1 google-resumable-media==0.5.0 googleapis-common-protos==1.51.0 greenlet==0.4.12 grin==1.2.1 grpc-google-iam-v1==0.12.3 grpcio==1.27.2 h5py==2.7.1 heapdict==1.0.0 html5lib==1.0.1 httplib2==0.17.1 idna==2.9 imageio==2.2.0 imagesize==0.7.1 ipaddress==1.0.19 ipykernel==4.8.0 ipython==5.4.1 ipython-genutils==0.2.0 ipywidgets==7.1.1 isort==4.2.15 itsdangerous==0.24 jdcal==1.3 jedi==0.11.1 Jinja2==2.10 jsonschema==2.6.0 jupyter==1.0.0 jupyter-client==5.2.2 jupyter-console==5.2.0 jupyter-core==4.4.0 jupyterlab==0.31.5 jupyterlab-launcher==0.10.2 kiwisolver==1.1.0 lazy-object-proxy==1.3.1 llvmlite==0.21.0 locket==0.2.0 lxml==4.1.1 MarkupSafe==1.0 matplotlib==2.2.5 mccabe==0.6.1 mistune==0.8.3 mpmath==1.0.0 msgpack-python==0.5.1 multipledispatch==0.4.9 navigator-updater==0.1.0 nbconvert==5.3.1 nbformat==4.4.0 networkx==2.1 nltk==3.2.5 nose==1.3.7 notebook==5.4.0 numba==0.36.2+0.g540650dbc.dirty numexpr==2.6.4 numpy==1.16.6 numpydoc==0.7.0 oauthlib==3.1.0 odo==0.5.1 olefile==0.45.1 openpyxl==2.4.10 packaging==16.8 pandas==0.24.2 pandas-gbq==0.13.1 pandocfilters==1.4.2 parso==0.1.1 partd==0.3.8 path.py==10.5 pathlib2==2.3.0 patsy==0.5.0 pep8==1.7.1 pexpect==4.3.1 pickleshare==0.7.4 Pillow==5.0.0 pkginfo==1.4.1 pluggy==0.6.0 ply==3.10 prompt-toolkit==1.0.15 protobuf==3.11.3 psutil==5.4.3 ptyprocess==0.5.2 py==1.5.2 py4j==0.10.7 pyasn1==0.4.8 pyasn1-modules==0.2.8 pycairo==1.15.4 pycodestyle==2.3.1 pycosat==0.6.3 pycparser==2.18 pycrypto==2.6.1 pycurl==7.43.0.1 pydata-google-auth==0.3.0 pyflakes==1.6.0 Pygments==2.2.0 pylint==1.8.2 pyodbc==4.0.22 pyOpenSSL==17.5.0 pyparsing==2.4.7 PySocks==1.6.7 pyspark==2.3.4 pytest==3.3.2 python-dateutil==2.8.1 pytz==2019.3 PyWavelets==0.5.2 PyYAML==3.12 pyzmq==16.0.3 QtAwesome==0.4.4 qtconsole==4.3.1 QtPy==1.3.1 requests==2.23.0 requests-oauthlib==1.3.0 rope==0.10.7 rsa==4.0 ruamel-yaml==0.15.35 scandir==1.6 scikit-image==0.13.1 scikit-learn==0.19.1 scipy==1.2.3 seaborn==0.9.1 Send2Trash==1.4.2 simplegeneric==0.8.1 singledispatch==3.4.0.3 six==1.13.0 snowballstemmer==1.2.1 sortedcollections==0.5.3 sortedcontainers==1.5.9 Sphinx==1.6.6 sphinxcontrib-websupport==1.0.1 spyder==3.2.6 SQLAlchemy==1.2.1 statsmodels==0.8.0 subprocess32==3.5.4 sympy==1.1.1 tables==3.4.2 tblib==1.3.2 terminado==0.8.1 testpath==0.3.1 toolz==0.9.0 tornado==4.5.3 traitlets==4.3.2 typing==3.6.2 unicodecsv==0.14.1 uritemplate==3.0.1 urllib3==1.25.8 wcwidth==0.1.7 webencodings==0.5.1 Werkzeug==0.14.1 widgetsnbextension==3.1.0 wrapt==1.10.11 xlrd==1.1.0 XlsxWriter==1.0.2 xlwt==1.3.0 zict==0.1.3