My name is Mark Omo, and I love contributing to open source software (especially in Python!), and open source hardware.
Linkedin: https://www.linkedin.com/in/markomo/
Hackaday IO: https://hackaday.io/MarkOmo
License: MIT License
My name is Mark Omo, and I love contributing to open source software (especially in Python!), and open source hardware.
Linkedin: https://www.linkedin.com/in/markomo/
Hackaday IO: https://hackaday.io/MarkOmo
After installing your package via pip install, I performed the test run with the proposed command. I received a traceback which is shown below.
Is the traceback due to false installation issues or HAT issues? Since am quite new in terms of Python programming and GitHub, it could be a beginner problem ;)
Thanks a lot.
pi@raspberrypi:~ $ pip install adafruit_motor_hat
Collecting adafruit_motor_hat
Using cached adafruit_motor_hat-0.2.0-py2.py3-none-any.whl
Collecting Adafruit-GPIO>=0.7 (from adafruit_motor_hat)
Collecting adafruit-pureio (from Adafruit-GPIO>=0.7->adafruit_motor_hat)
Using cached Adafruit_PureIO-0.2.1-py2-none-any.whl
Collecting spidev (from Adafruit-GPIO>=0.7->adafruit_motor_hat)
Installing collected packages: adafruit-pureio, spidev, Adafruit-GPIO, adafruit-motor-hat
Successfully installed Adafruit-GPIO-1.0.3 adafruit-motor-hat-0.2.0 adafruit-pureio-0.2.1 spidev-3.2
pi@raspberrypi:~ $ python -m unittest tests.test_adafruit_motor_hat
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/usr/lib/python2.7/unittest/main.py", line 12, in
main(module=None)
File "/usr/lib/python2.7/unittest/main.py", line 94, in init
self.parseArgs(argv)
File "/usr/lib/python2.7/unittest/main.py", line 149, in parseArgs
self.createTests()
File "/usr/lib/python2.7/unittest/main.py", line 158, in createTests
self.module)
File "/usr/lib/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/lib/python2.7/unittest/loader.py", line 100, in loadTestsFromName
parent, obj = obj, getattr(obj, part)
AttributeError: 'module' object has no attribute 'test_adafruit_motor_hat'
Install the library to test out my stepper motor. This is running on a NanoPi M4 (RK3399 based) running Armbian 5.7.6
# pip3 install adafruit_motor_hat
First error:
Collecting Adafruit-GPIO>=0.7 (from adafruit_motor_hat)
Downloading https://files.pythonhosted.org/packages/db/1c/2dc8a674514219f287fa344e44cadfd77b3e2878d6ff602a8c2149b50dd8/Adafruit_GPIO-1.0.3.tar.gz
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'setuptools'
Second error:
Collecting spidev (from Adafruit-GPIO>=0.7->adafruit_motor_hat)
Downloading https://files.pythonhosted.org/packages/36/83/73748b6e1819b57d8e1df8090200195cdae33aaa22a49a91ded16785eedd/spidev-3.2.tar.gz
Building wheels for collected packages: Adafruit-GPIO, adafruit-pureio, spidev
Running setup.py bdist_wheel for Adafruit-GPIO ... error
Complete output from command /usr/bin/python3 -u -c "import setuptools, tokenize;__file__='/tmp/pip-build-n5oo8i6v/Adafruit-GPIO/setup.py';f=getattr(tokenize, 'open', open)(__file__);code=f.read().replace('\r\n', '\n');f.close();exec(compile(code, __file__, 'exec'))" bdist_wheel -d /tmp/tmpf_svmmpkpip-wheel- --python-tag cp36:
usage: -c [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
or: -c --help [cmd1 cmd2 ...]
or: -c --help-commands
or: -c cmd --help
error: invalid command 'bdist_wheel'
Third error:
aarch64-linux-gnu-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -g -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -fPIC -I/usr/include/python3.6m -c spidev_module.c -o build/temp.linux-aarch64-3.6/spidev_module.o
spidev_module.c:20:10: fatal error: Python.h: No such file or directory
#include <Python.h>
^~~~~~~~~~
compilation terminated.
error: command 'aarch64-linux-gnu-gcc' failed with exit status 1
The resolution was to install each of the dependancies, I feel it would be better if this package called them out or tested for them and exit gracefully than blowing up and expecting consumers to debug it.
# apt install python3-dev
# pip3 install setuptools
# pip3 install wheel
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.