gpt4 book ai didi

python - UserWarning : Could not import the lzma module. 您安装的Python不完整

转载 作者:行者123 更新时间:2023-12-03 03:36:23 28 4
gpt4 key购买 nike

安装 Google Cloud Bigquery 模块后,如果我将该模块导入 python 代码。我看到这条警告消息。在 python 3.7.3 Virtualenv 中发生在我身上。

尝试重新安装 GCP bigquery 模块如果我们编写“from google.cloud import bigquery”,Python 代码中的期望。不应导致任何错误或消息。

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()

最佳答案

如果从源代码编译Python,则必须安装lzma-dev包,否则它不会内置到python中。

对于 ubuntu:sudo apt-get install liblzma-dev

对于centos:yum install -y xz-devel

然后配置&& make && make install

关于python - UserWarning : Could not import the lzma module. 您安装的Python不完整,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57743230/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com