【问题标题】:WARNING: Legacy build of wheel for 'pysqlite3' created no files. - How do I build a non-legacy build of wheels?警告:“pysqlite3”的旧版轮子没有创建文件。 - 我如何构建一个非传统版本的轮子?
【发布时间】:2021-09-18 19:45:52
【问题描述】:

我尝试在我的 AWS EC2 实例上安装一个包 (https://github.com/lucidrains/stylegan2-pytorch)。我已经安装了 Python 3.7,并试图通过运行来安装包:

python3.7 -m pip install stylegan2_pytorch

它成功安装了很多东西,但突然我收到以下错误:

Building wheels for collected packages: pysqlite3
  Building wheel for pysqlite3 (setup.py) ... done
  WARNING: Legacy build of wheel for 'pysqlite3' created no files.
  Command arguments: /usr/bin/python3.7 -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-vszwoeo2/pysqlite3_3da8bd243f194e7b910604541c09f525/setup.py'"'"'; __file__='"'"'/tmp/pip-install-vszwoeo2/pysqlite3_3da8bd243f194e7b910604541c09f525/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-i7fy88qv
  Command output: [use --verbose to show]
  Running setup.py clean for pysqlite3
Failed to build pysqlite3
Installing collected packages: pysqlite3
    Running setup.py install for pysqlite3 ... done
Successfully installed pysqlite3

由于我对 Python 版本控制和其他东西的美妙世界非常陌生,我不知道这意味着什么。我的 sqlite 数据库(我显然拥有?)是旧版本吗?

我该如何解决这个问题才能继续?

【问题讨论】:

    标签: python pysqlite


    【解决方案1】:

    通过使用我看到的--verbose-flag:

    src/connection.h:27:20: fatal error: Python.h: No such file or directory
    

    当时这个帖子帮助了我: https://stackoverflow.com/a/22077790/5090346

    我由 python 版本指定(在我的例子中是 3.7):

    sudo apt-get install python3.7-dev
    

    然后就成功了!

    【讨论】:

      猜你喜欢
      • 2017-08-19
      • 2020-06-23
      • 2015-10-12
      • 2021-03-12
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-19
      相关资源
      最近更新 更多