After Installing Google Cloud Bigquery Module, if I import the module into python code. I see this warning message. Happening to me in python 3.7.3 Virtualenv.
Tried to reinstall GCP bigquery module Expectation-in python code if we write" from google.cloud import bigquery ".Should not result in any error or messege.
import os import sys import logging from datetime import datetime from google.cloud import bigquery
/home/informatica/.local/lib/python3.7/site-packages/pandas/compat/__init__.py:84: UserWarning: Could not import the lzma module. Your installed Python is incomplete. Attempting to use lzma compression will result in a RuntimeError. warnings.warn(msg) exit()
If you compile Python from source, you must have the lzma-dev
package installed, or it will not be built into python.
For ubuntu: sudo apt-get install liblzma-dev
For centos: yum install -y xz-devel
Then configure && make && make install
I used other good answers from here and didn't solve the problem (Ubuntu 18.04, Python3.8), still get this warning. Actually there is one more package is needed to be installed to solve the problem:
sudo apt-get install lzma
So the whole pipeline (run in the python source code folder):
sudo apt-get install liblzma-dev sudo apt-get install lzma ./configure --enable-optimizations sudo make sudo make altinstall
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With