gpt4 book ai didi

python-2.7 - CompileError : command 'arm-linux-gnueabihf-gcc' failed with exit status 1

转载 作者:行者123 更新时间:2023-12-02 10:42:13 25 4
gpt4 key购买 nike

执行此代码时出现以下错误:

import time
import sys
import Adafruit_MCP9808.MCP9808 as MCP9808
import json;

sensor = MCP9808.MCP9808()

错误:
Traceback (most recent call last):
File "/home/pi/sensor01.py", line 17, in <module>
sensor = MCP9808.MCP9808()`enter code here`
File "/home/pi/Adafruit_MCP9808/MCP9808.py", line 62, in __init__
import Adafruit_GPIO.I2C as I2C
File "/home/pi/Adafruit_GPIO/I2C.py", line 25, in <module>
import smbus
File "/home/pi/smbus/__init__.py", line 1, in <module>
from .smbus import ffi
File "/home/pi/smbus/smbus.py", line 94, in <module>
""", ext_package='smbus')
File "/home/pi/smbus/cffi/api.py", line 433, in verify
lib = self.verifier.load_library()
File "/home/pi/smbus/cffi/verifier.py", line 113, in load_library
self._compile_module()
File "/home/pi/smbus/cffi/verifier.py", line 210, in _compile_module
outputfilename = ffiplatform.compile(tmpdir, self.get_extension())
File "/home/pi/smbus/cffi/ffiplatform.py", line 29, in compile
outputfilename = _build(tmpdir, ext, compiler_verbose)
File "/home/pi/smbus/cffi/ffiplatform.py", line 62, in _build
raise VerificationError('%s: %s' % (e.__class__.__name__, e))
VerificationError: CompileError: command 'arm-linux-gnueabihf-gcc' failed with exit status 1

最佳答案

原来是权限问题-尝试安装setup.py时。
这篇文章帮助我解决了以下问题:
https://unix.stackexchange.com/questions/119358/create-file-in-folder-permission-denied

关于python-2.7 - CompileError : command 'arm-linux-gnueabihf-gcc' failed with exit status 1,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/36465212/

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