You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
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:
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:
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
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
Activity
rbuffat commentedon Mar 1, 2018
This message indicates that the module ASUS.GPIO is not installed. Can you post the output of
sudo python3 setup.py installfarzadsw commentedon May 19, 2018
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
farzadsw commentedon May 19, 2018
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.
scorpiochang commentedon Jul 27, 2018
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.
cr1901 commentedon Jul 14, 2020
This is an old issue, but might as well respond with what worked for me:
If you try to import
ASUS.GPIOfrom within thegpio_lib_pythonsource directory root,pythonwill think the module you want to import is at the wrong place:Outside of the source directory, however,
pythonwill pick up the correct module if you've ransetup.py install, andimport ASUS.GPIOwill succeed:Solution for me was to not test the library from within the
gpio_lib_pythondirectory.ZongXR commentedon Dec 18, 2023
Great! That's usefule for me. Thank you very much.
Baiokis commentedon Dec 29, 2023
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
ZongXR commentedon Jan 24, 2024
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 python2sudo pip3 install . # for python3, and notice the dot at the endI tried this successfully
ismirgibmir commentedon Apr 13, 2025
I reject this solution fix the install.