login|Register
Forum > Python
Post|
看36881|回25|Favorite
nopnop2002 看全部
2017-10-10 21:58:00
Edited by nopnop2002 at 2017-10-10 22:01

@alexp1

You need this.

##Generate Bindings swig2.0 -python wiringpi.i or swig3.0 -thread -python wiringpi.i

##Build & install with sudo python setup.py install

Or Python 3: sudo python3 setup.py install
alexp1 看全部
2017-10-10 22:52:27
Edited by alexp1 at 2017-10-11 07:07

quote:

nopnop2002 replied at 2017-10-10 21:58
@alexp1

You need this.

hi , Nopnop2002 , i thank you very much for your help, pultroppo while i try to write the commands I come to video error messagesthe following when I write the first command

code:

  1. swig2.0 -python wiringpi.i
sudo: swig2.0 : command not found

code:

  1. swig3.0 -thread -python wiringpi.i
swig error : unrecognized option -thread
use  "swig help for avaible option

and

code:

  1. sudo python3 setup.py install
can't open file "setup.py" : [errno 2] no such file or directory
if type in alexp@orangepione:/WiringPi-Python-OP/WiringPi

or
trackback (most recent call last):
file "setup.py" , line 3, in <module>
from setuptools import setup, find_packages, extension
ImportError: no module named "setuptools"
if type in alexp@orangepione:/WiringPi-Python-OP
---------

if it can be helpful I tried to send these two commands from alex @ orangepione:

  sudo apt update

and now when type

  $ sudo python ./webioOP.py
and
[backcolor=rgba(0, 0, 0, 0.024)][size=12.1007px]sudo pip install wiringpi

view
  photo link 2

Thanks again ...



***************************update: I managed to run the project. as soon as possible I try to make all the steps and write down the phases then I'll write in this hread the steps step by step for who might be in the situation of not being able to run the project again thanks to nopnop2002*******

attachment: 您需要登录才可以下载或查看附件。没有账号?Register
nopnop2002 看全部
2017-10-11 06:23:56
@alexp1

$ sudo apt-get install python-dev python-setuptools swig
$ cd WiringPi-Python-OP
$ swig2.0 -python wiringpi.i
$ sudo python setup.py install
$ cd tests
$ sudo python test.py
alexp1 看全部
2017-10-11 07:11:17

quote:

nopnop2002 replied at 2017-10-11 06:23
@alexp1

$ sudo apt-get install python-dev python-setuptools swig

Thank you so much, I believe that the key steps are exactly what you indicated, I read the message after updating my message before the success of the project .... thank you again and thank you for the great project that you donated it to everyone !! , in the coming days I will try to use relays and play games turn off lights etc .. thanks again
Petrov38 看全部
2017-12-22 13:39:39
Good afternoon. I tried to do your instructions. Everything compiled, but does not want to work. Please tell me how to fix?

code:

  1. root@orangepipc:~/WiringPi-Python-OP# sudo python webioOP.py
  2. Unable to determine hardware version. I see: Hardware   : sun8i
  3. ,
  4. - expecting BCM2708, BCM2709 or BCM2835.
  5. If this is a genuine Raspberry Pi then please report this
  6. to projects@drogon.net. If this is not a Raspberry Pi then you
  7. are on your own as wiringPi is designed to support the
  8. Raspberry Pi ONLY.

OrangePi En

Powered by Discuz! X3.4

homepage|Simple edition|Touch edition|PC