좋아요, 저는 프로그램에 pi2go.py를 가져 와서 로봇을 프로그래밍하고 있습니다. 저는 Raspberry pi (Linux raspberrypi 4.1.19-v7 +)에서 Linux 데비안을 실행하고 있습니다. Pi2go는 smbus를 가져 오는 pca9685.py를 가져옵니다. 우선 smbus가 내 시스템에 설치되지 않았으므로 파이썬 용 smbus-cffi 패키지가 있습니다. 좋아, 이제 smbus 디렉토리를 내 파일과 같은 디렉토리에 복사했다. 그 다음에는 python이 그것을 설치했다. 상대 패키지를 얻으려고했다. 오류를 정확하게 기억하지는 않지만 뭔가ImportError : _smbus_cffi라는 모듈이 없습니다
#!/usr/bin/python
#
# PCA9685 Library
# Purely used for Pi2Go, so not as flexible as other libraries
#
# Created by Gareth Davies, Feb 2016
# Copyright 4tronix
#
# This code is in the public domain and may be freely copied and used
# No warranty is provided or implied
#
#======================================================================
from smbus import smbus, time
bus = smbus.SMBus(1)
PCA = 0x40 # Fixed I2C Address of PC9685
SERVOS = 6+48
RED = 14
GREEN = 10
and program continues...
: 여기
가 pca9685.py은 다음과 같습니다 : 방법, 좋아, 내가 SMBUS 수입 import 문에 SMBUS에서 추가 (그래서 그것의 단지 부분 난 단지 import 문을 변경)
그런 다음 프로그램을 다시 실행하려고하면 다음과 같은 오류 메시지가 표시됩니다.
이 내 폴더에있는 모든 것들 : 그래서
__about__.py lightTest.py pca9685.pyc smbus switchTest.py
beebot1.py linetest.py pi2go.py smbuscffi testLEDs.py
beebot.py lineTest.py pi2go.pyc smbus-cffi util.py
__init__.py liteTest.py servod smbus.py
IRTest.py motorTest.py servoTest.py smbus.pyc
LEDTest.py pca9685.py sgh_PCF8591P.py sonarTest.py
, 질문은, I'am 나는이 완전히 잘못하고 어디서 나는 모듈 __smbus_cffi을받을 수 있나요? 이 __smbus_cffi 모듈 다음으로 어디에서나 보았습니다