Coder Social home page Coder Social logo

adafruit_motor_hat's Introduction

adafruit_motor_hat's People

Contributors

ferret-guy avatar pyup-bot avatar

Watchers

 avatar  avatar

adafruit_motor_hat's Issues

This module failed to install via pip3

  • Adafruit-Motor-Hat version: 0.2.0
  • Python version: 3.6.7
  • Operating System: Ubuntu 18.04.2 LTS (aarch64)

Description

Install the library to test out my stepper motor. This is running on a NanoPi M4 (RK3399 based) running Armbian 5.7.6

What I Did

# 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

Workaround

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

Issues with test run

  • Adafruit-Motor-Hat version: Adafruit DC & Stepper Motor HAT for Raspberry Pi - mini Kit - 2348
  • Python version: 2.7.13-2
  • Operating System: Raspbian GNU/Linux 9

Description

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.

Terminal history

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'

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.