Git Product home page Git Product logo

Comments (8)

rbuffat avatar rbuffat commented on September 3, 2024

This message indicates that the module ASUS.GPIO is not installed. Can you post the output of
sudo python3 setup.py install

from gpio_lib_python.

farzadsw avatar farzadsw commented on September 3, 2024

I have same problem. this is out put of setup.py:
linaro@tinkerboard:~/gpio_lib_python$ sudo python3 setup.py install
running install
running build
running build_py
creating build
creating build/lib.linux-armv7l-3.5
creating build/lib.linux-armv7l-3.5/ASUS
copying ASUS/init.py -> build/lib.linux-armv7l-3.5/ASUS
running build_ext
building 'ASUS.GPIO' extension
creating build/temp.linux-armv7l-3.5
creating build/temp.linux-armv7l-3.5/source
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/py_gpio.c -o build/temp.linux-armv7l-3.5/source/py_gpio.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/c_gpio.c -o build/temp.linux-armv7l-3.5/source/c_gpio.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/cpuinfo.c -o build/temp.linux-armv7l-3.5/source/cpuinfo.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/event_gpio.c -o build/temp.linux-armv7l-3.5/source/event_gpio.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/soft_pwm.c -o build/temp.linux-armv7l-3.5/source/soft_pwm.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/py_pwm.c -o build/temp.linux-armv7l-3.5/source/py_pwm.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/common.c -o build/temp.linux-armv7l-3.5/source/common.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/constants.c -o build/temp.linux-armv7l-3.5/source/constants.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/wiringTB.c -o build/temp.linux-armv7l-3.5/source/wiringTB.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.5/source/py_gpio.o build/temp.linux-armv7l-3.5/source/c_gpio.o build/temp.linux-armv7l-3.5/source/cpuinfo.o build/temp.linux-armv7l-3.5/source/event_gpio.o build/temp.linux-armv7l-3.5/source/soft_pwm.o build/temp.linux-armv7l-3.5/source/py_pwm.o build/temp.linux-armv7l-3.5/source/common.o build/temp.linux-armv7l-3.5/source/constants.o build/temp.linux-armv7l-3.5/source/wiringTB.o -o build/lib.linux-armv7l-3.5/ASUS/GPIO.cpython-35m-arm-linux-gnueabihf.so
running install_lib
creating /usr/local/lib/python3.5/dist-packages/ASUS
copying build/lib.linux-armv7l-3.5/ASUS/init.py -> /usr/local/lib/python3.5/dist-packages/ASUS
copying build/lib.linux-armv7l-3.5/ASUS/GPIO.cpython-35m-arm-linux-gnueabihf.so -> /usr/local/lib/python3.5/dist-packages/ASUS
byte-compiling /usr/local/lib/python3.5/dist-packages/ASUS/init.py to init.cpython-35.pyc
running install_egg_info
Writing /usr/local/lib/python3.5/dist-packages/ASUS.GPIO-0.1.egg-info
running install
running build
running build_py
creating build/lib.linux-armv7l-3.5/RPi
copying RPi/init.py -> build/lib.linux-armv7l-3.5/RPi
running build_ext
building 'RPi.GPIO' extension
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/py_gpio_RPi.c -o build/temp.linux-armv7l-3.5/source/py_gpio_RPi.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/c_gpio.c -o build/temp.linux-armv7l-3.5/source/c_gpio.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/cpuinfo.c -o build/temp.linux-armv7l-3.5/source/cpuinfo.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/event_gpio.c -o build/temp.linux-armv7l-3.5/source/event_gpio.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/soft_pwm.c -o build/temp.linux-armv7l-3.5/source/soft_pwm.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/py_pwm.c -o build/temp.linux-armv7l-3.5/source/py_pwm.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/common.c -o build/temp.linux-armv7l-3.5/source/common.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/constants.c -o build/temp.linux-armv7l-3.5/source/constants.o
arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.5m -c source/wiringTB.c -o build/temp.linux-armv7l-3.5/source/wiringTB.o
arm-linux-gnueabihf-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-z,relro -Wl,-z,relro -g -fdebug-prefix-map=/build/python3.5-haFsHd/python3.5-3.5.3=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 build/temp.linux-armv7l-3.5/source/py_gpio_RPi.o build/temp.linux-armv7l-3.5/source/c_gpio.o build/temp.linux-armv7l-3.5/source/cpuinfo.o build/temp.linux-armv7l-3.5/source/event_gpio.o build/temp.linux-armv7l-3.5/source/soft_pwm.o build/temp.linux-armv7l-3.5/source/py_pwm.o build/temp.linux-armv7l-3.5/source/common.o build/temp.linux-armv7l-3.5/source/constants.o build/temp.linux-armv7l-3.5/source/wiringTB.o -o build/lib.linux-armv7l-3.5/RPi/GPIO.cpython-35m-arm-linux-gnueabihf.so
running install_lib
creating /usr/local/lib/python3.5/dist-packages/RPi
copying build/lib.linux-armv7l-3.5/RPi/init.py -> /usr/local/lib/python3.5/dist-packages/RPi
copying build/lib.linux-armv7l-3.5/RPi/GPIO.cpython-35m-arm-linux-gnueabihf.so -> /usr/local/lib/python3.5/dist-packages/RPi
byte-compiling /usr/local/lib/python3.5/dist-packages/RPi/init.py to init.cpython-35.pyc
running install_egg_info
Writing /usr/local/lib/python3.5/dist-packages/RPi.GPIO-0.1.egg-info

from gpio_lib_python.

farzadsw avatar farzadsw commented on September 3, 2024

I checked the build directory, the module is created . After I manually copied the module file to my path it worked. So i guess the install script needs to be fixed.

from gpio_lib_python.

scorpiochang avatar scorpiochang commented on September 3, 2024

Hi farzadsw

i just install gpio_lib_python and run test program. i don't observe any error message.
can i know what program you can't execute before you copy module files?
thank you.

from gpio_lib_python.

cr1901 avatar cr1901 commented on September 3, 2024

This is an old issue, but might as well respond with what worked for me:

If you try to import ASUS.GPIO from within the gpio_lib_python source directory root, python will think the module you want to import is at the wrong place:

wjones@DietPi:~/src/tinker/gpio_lib_python$ python3 -c 'import ASUS; print(ASUS.__path__)'
['/home/wjones/src/tinker/gpio_lib_python/ASUS']
wjones@DietPi:~/src/tinker/gpio_lib_python$ python3 -c 'import ASUS.GPIO'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'ASUS.GPIO'

Outside of the source directory, however, python will pick up the correct module if you've ran setup.py install, and import ASUS.GPIO will succeed:

wjones@DietPi:~/src/tinker$ python3 -c 'import ASUS; print(ASUS.__path__)'
['/usr/local/lib/python3.7/dist-packages/ASUS']
wjones@DietPi:~/src/tinker$ python3 -c 'import ASUS.GPIO'
wjones@DietPi:~/src/tinker$

Solution for me was to not test the library from within the gpio_lib_python directory.

from gpio_lib_python.

ZongXR avatar ZongXR commented on September 3, 2024

This is an old issue, but might as well respond with what worked for me:

If you try to import ASUS.GPIO from within the gpio_lib_python source directory root, python will think the module you want to import is at the wrong place:

wjones@DietPi:~/src/tinker/gpio_lib_python$ python3 -c 'import ASUS; print(ASUS.__path__)'
['/home/wjones/src/tinker/gpio_lib_python/ASUS']
wjones@DietPi:~/src/tinker/gpio_lib_python$ python3 -c 'import ASUS.GPIO'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'ASUS.GPIO'

Outside of the source directory, however, python will pick up the correct module if you've ran setup.py install, and import ASUS.GPIO will succeed:

wjones@DietPi:~/src/tinker$ python3 -c 'import ASUS; print(ASUS.__path__)'
['/usr/local/lib/python3.7/dist-packages/ASUS']
wjones@DietPi:~/src/tinker$ python3 -c 'import ASUS.GPIO'
wjones@DietPi:~/src/tinker$

Solution for me was to not test the library from within the gpio_lib_python directory.

Great! That's usefule for me. Thank you very much.

from gpio_lib_python.

Baiokis avatar Baiokis commented on September 3, 2024

I have the same problem, someone can help me?

Traceback (most recent call last):
File "c:\Users\alexa\OneDrive\Documentos\BM Tech\TinkerBoard\gpio_lib_python\test\GPIO_IN_OUT_test.py", line 2, in
import ASUS.GPIO as GPIO
ModuleNotFoundError: No module named 'ASUS'

I already install every dependence and others packages

from gpio_lib_python.

ZongXR avatar ZongXR commented on September 3, 2024

I have the same problem, someone can help me?

Traceback (most recent call last): File "c:\Users\alexa\OneDrive\Documentos\BM Tech\TinkerBoard\gpio_lib_python\test\GPIO_IN_OUT_test.py", line 2, in import ASUS.GPIO as GPIO ModuleNotFoundError: No module named 'ASUS'

I already install every dependence and others packages

You should manually modify setup.py. Retain just one setup function and delete another. And then install like this.
sudo python setup.py install # for python2
sudo pip3 install . # for python3, and notice the dot at the end
I tried this successfully

from gpio_lib_python.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.