Linux安装jsonnet失败

报错

Building wheels for collected packages: jsonnet
Building wheel for jsonnet (setup.py) … error
ERROR: Command errored out with exit status 1:
command: /opt/conda/envs/spanrel/bin/python -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-wui0ge_u/jsonnet_b3e6a8453ce54896b5c962b87a81d432/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-wui0ge_u/jsonnet_b3e6a8453ce54896b5c962b87a81d432/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-cnhrx_wr
cwd: /tmp/pip-install-wui0ge_u/jsonnet_b3e6a8453ce54896b5c962b87a81d432/
Complete output (4 lines):
running bdist_wheel
running build
running build_ext
error: [Errno 2] No such file or directory: ‘make’: ‘make’

ERROR: Failed building wheel for jsonnet
Running setup.py clean for jsonnet
Failed to build jsonnet
Installing collected packages: jsonnet, h5py, gevent, ftfy, flask-cors, flaky, editdistance, conllu, awscli, allennlp
Running setup.py install for jsonnet … error
ERROR: Command errored out with exit status 1:
command: /opt/conda/envs/spanrel/bin/python -u -c ‘import io, os, sys, setuptools, tokenize; sys.argv[0] = ‘"’"’/tmp/pip-install-wui0ge_u/jsonnet_b3e6a8453ce54896b5c962b87a81d432/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-wui0ge_u/jsonnet_b3e6a8453ce54896b5c962b87a81d432/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’”’“‘))’ install --record /tmp/pip-record-di28z1f7/install-record.txt --single-version-externally-managed --compile --install-headers /opt/conda/envs/spanrel/include/python3.6m/jsonnet
cwd: /tmp/pip-install-wui0ge_u/jsonnet_b3e6a8453ce54896b5c962b87a81d432/
Complete output (4 lines):
running install
running build
running build_ext
error: [Errno 2] No such file or directory: ‘make’: ‘make’
----------------------------------------
ERROR: Command errored out with exit status 1: /opt/conda/envs/spanrel/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '”‘"’/tmp/pip-install-wui0ge_u/jsonnet_b3e6a8453ce54896b5c962b87a81d432/setup.py’“'”‘; file=’“'”‘/tmp/pip-install-wui0ge_u/jsonnet_b3e6a8453ce54896b5c962b87a81d432/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’”’"‘))’ install --record /tmp/pip-record-di28z1f7/install-record.txt --single-version-externally-managed --compile --install-headers /opt/conda/envs/spanrel/include/python3.6m/jsonnet Check the logs for full command output.

1、确保是否正确安装了构建依赖项,比如 C 编译器和相关的开发库。

在不同的操作系统上可能有不同的方法。例如,在 Ubuntu 上,您可以运行以下命令安装构建工具链

sudo apt-get update
sudo apt-get install build-essential

对于其他操作系统,请查阅相应的文档来安装所需的构建工具。

2、检查是否已经安装了相关的依赖项

缺少了 jsonnet 包的构建依赖项。可以尝试使用系统包管理器或 Python 包管理器来安装该依赖项。例如,对于 Ubuntu 系统,可以运行以下命令:

sudo apt-get install libjsonnet-dev

对于使用 pip 来安装的情况,可能需要先安装该依赖项的开发文件,再重新运行安装命令。

  • 如果上述方法都没有解决问题,可以尝试使用预编译的二进制版本,而不是从源代码构建安装。对于某些包来说,可能会提供预编译的二进制分发版,可以选择使用。可以在包的官方文档或 GitHub 页面上查找预编译版本的说明。
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值