我尝试在我的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数据库(显然是我有的?)在遗留版本中?
我如何解决这个问题才能继续?
发布于 2021-09-18 21:19:33
通过使用--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然后它成功了!
https://stackoverflow.com/questions/69237931
复制相似问题