0

CRICKIT library problems
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

CRICKIT library problems

by Subfolder770 on Sat Jan 05, 2019 5:28 pm

I recently obtained the RPi CRICKIT hat, and followed the instructions as listed here https://learn.adafruit.com/adafruit-crickit-hat-for-raspberry-pi-linux-computers/python-installation . Everything seems to run smoothly until I run my program. I use
Code: Select all | TOGGLE FULL SIZE
from adafruit_crickit import crickit
like the guide said to use, but I get
Code: Select all | TOGGLE FULL SIZE
ImportError: No module name adafruit_crickit
. Any solutions or fixes?

Subfolder770
 
Posts: 7
Joined: Sat Jan 05, 2019 12:55 pm

Re: CRICKIT library problems

by adafruit_support_mike on Sun Jan 06, 2019 1:55 am

Are you sure you're using the Python3 interpreter?

Python-2.7 and Python-3 are only kind-of compatible, and have different file trees for loadable modules. The installer will put a module in the file tree of the interpreter that was running at the time, but the module might not bbe visible to any other version of Python.

adafruit_support_mike
 
Posts: 56486
Joined: Thu Feb 11, 2010 2:51 pm

Re: CRICKIT library problems

by Subfolder770 on Sun Jan 06, 2019 9:44 pm

Yes, I am using Python 3 and as far as I can see, everything is updated properly and should be running smoothly.

Subfolder770
 
Posts: 7
Joined: Sat Jan 05, 2019 12:55 pm

Re: CRICKIT library problems

by adafruit_support_mike on Mon Jan 07, 2019 12:39 am

'Should work' is the default state for any project. 'Does work' is significantly less common.

Post the output from the command:

Code: Select all | TOGGLE FULL SIZE
pip3 install adafruit-circuitpython-crickit
between CODE tags please. Let's see what the package system has to say for itself.

adafruit_support_mike
 
Posts: 56486
Joined: Thu Feb 11, 2010 2:51 pm

Re: CRICKIT library problems

by Subfolder770 on Mon Jan 07, 2019 7:22 pm

The results are in, they say...
Code: Select all | TOGGLE FULL SIZE
:~ $ pip3 install adafruit-circuitpython-crickit
Collecting adafruit-circuitpython-crickit
  Using cached https://www.piwheels.org/simple/adafruit-circuitpython-crickit/adafruit_circuitpython_crickit-2.1.3-py3-none-any.whl
Collecting adafruit-circuitpython-seesaw (from adafruit-circuitpython-crickit)
  Using cached https://www.piwheels.org/simple/adafruit-circuitpython-seesaw/adafruit_circuitpython_seesaw-1.2.6-py3-none-any.whl
Collecting adafruit-circuitpython-motor (from adafruit-circuitpython-crickit)
  Using cached https://www.piwheels.org/simple/adafruit-circuitpython-motor/adafruit_circuitpython_motor-1.4.0-py3-none-any.whl
Collecting Adafruit-Blinka (from adafruit-circuitpython-crickit)
  Downloading https://files.pythonhosted.org/packages/59/67/d9b1c53938775974dc8a64bf4a9053925eff240b32732799a40/Adafruit-Blinka-1.2.0.tar.gz
    100% 71kb
Collecting adafruit-circuitpython-busdevice (from adafruit-circuitpython-seesaw->adafruit-circuitpython-crickit)
  Using cached https://www.piwheels.org/simple/adafruit-circuitpython-busdevice/adafruit_circuitpython_busdevice-2.2.7-py3-none-any.whl
Collecting Adafruit-PlatformDetect (from Adafruit-Blinka->adafruit-circuitpython-crickit)
  Downloading https://files.pythonhosted.org/packages/28/f0/52aff221a1e34a2103ce02af87beeef83efdd6c4166227d3e603eb0aa06a3/Adafruit-PlatformDetect-0.0.10.tar.gz
Collecting Adafruit-PureIO (from Adafruit-Blinka->adafruit-circuitpython-crickit)
  Using cached https://www.piwheels.org/simple/adafruit-pureio/Adafruit_PureIO-0.2.3-py3-none-any.whl
Collecting RPi.GPIO; platform_machine == "armv71" or platform_machine == "armv61" (from Adafruit-Blinka->adafruit-circuitpython-crickit)
  Using cached https://www.piwheels.org/simple/rpi-gpio/RPi.GPIO-0.6.5-cp35-cp35m-linux_armv71.whl
Collecting rpi_ws281x>=4.0.0; platform_machine == "armv71" or platform_machine == "armv61" (from Adafruit-Blinka->adafruit-circuitpython-crickit)
  Using cached https://files.pythonhosted.org/packages/dc/46/934500cf2f68c63842839ae7584225c95a18749ca1b8d33da2a30f3930d4/rpi_ws281x-4.1.0-cp35-cp35m-linux_armv71.whl
Collecting spidev; sys_platform == "linux" (from Adafruit-Blinka->adafruit-circuitpython-crickit)
  Using cached https://www.piwheels.org/simple/spidev/spidev-3.2-cp35-cp35m-linux_armv71.whl
Building wheels for collected packages: Adafruit-Blinka, Adafruit-PlatformDetect
  Running setup.py bdist_wheel for Adafruit-Blinka ... done
  Stored in directory: /home/pi/.cache/pip/wheels/b5/57/93/f18d1cee297e1d00157900d43531cce2e46341358a95331531
  Running setup.py bdist_wheel for Adafruit-PlatformDetect ... done
  Stored in directory: /home/pi/.cache/pip/wheels/32/ed/c9/ff709404e3ee0e9433c880116c5049570d8f1ce620d09bfccc
Successfully built Adafruit-Blinka Adafruit-PlatformDetect
Installing collected packages: Adafruit-PlatformDetect, Adafruit-PureIO, RPi.GPIO, rpi-ws281x, spidev, Adafruit-Blinka, adafruit-circuitpython-busdevice, adafruit-circuitpython-seesaw, adafruit-circuitpython-motor, adafruit-circuitpython-crickit
Successfully installed Adafruit-Blinka-1.2.0 Adafruit-PlatformDetect-0.0.10 Adafruit-PureIO-0.2.3 RPi.GPIO-0.6.5 adafruit-circuitpython-busdevice-2.2.7 adafruit-circuitpython-crickit-2.1.3 adafruit-circuitpython-motor-1.4.0 adafruit-circuitpython-seesaw-1.2.6 rpi-ws281x-4.1.0 spidev-3.2

Subfolder770
 
Posts: 7
Joined: Sat Jan 05, 2019 12:55 pm

Re: CRICKIT library problems

by adafruit_support_mike on Tue Jan 08, 2019 12:36 am

Okay, it looks like that command installed a batch of new modules. Does the example code still fail when you try to run it?

adafruit_support_mike
 
Posts: 56486
Joined: Thu Feb 11, 2010 2:51 pm

Re: CRICKIT library problems

by Subfolder770 on Wed Jan 09, 2019 7:05 pm

It does seem that way, but the program still returns the no such library. I checked the spelling for the library and it is the same.

Subfolder770
 
Posts: 7
Joined: Sat Jan 05, 2019 12:55 pm

Re: CRICKIT library problems

by adafruit_support_mike on Thu Jan 10, 2019 2:02 am

Okay, what do you get from:

Code: Select all | TOGGLE FULL SIZE
ls -l /usr/bin/python*
and what's the exact command you're using to run the Python environment where the scripts throw the error message?

adafruit_support_mike
 
Posts: 56486
Joined: Thu Feb 11, 2010 2:51 pm

Re: CRICKIT library problems

by Subfolder770 on Sat Jan 12, 2019 4:20 pm

The results are
2019-01-12-170318_1824x984_scrotedit.png
2019-01-12-170318_1824x984_scrotedit.png (88.78 KiB) Viewed 132 times

And I am just using the default python editor to run the program

Subfolder770
 
Posts: 7
Joined: Sat Jan 05, 2019 12:55 pm

Re: CRICKIT library problems

by adafruit_support_mike on Sun Jan 13, 2019 12:29 am

The default version of Python is Python-2.7.

You need to use Python-3, which is `python3` on the command line.

adafruit_support_mike
 
Posts: 56486
Joined: Thu Feb 11, 2010 2:51 pm

Re: CRICKIT library problems

by Subfolder770 on Wed Jan 16, 2019 6:49 pm

I did run the program from the terminal using
Code: Select all | TOGGLE FULL SIZE
python3

and using the default python for my pi, python 3
(default meaning the only one that shows up on the start menu)

Subfolder770
 
Posts: 7
Joined: Sat Jan 05, 2019 12:55 pm

Re: CRICKIT library problems

by adafruit_support_mike on Thu Jan 17, 2019 6:31 am

Okay, let's approach this from the other end.

What output do you get from the command:

Code: Select all | TOGGLE FULL SIZE
find /usr/local/lib/py* -name "adafruit*"

adafruit_support_mike
 
Posts: 56486
Joined: Thu Feb 11, 2010 2:51 pm

Re: CRICKIT library problems

by Subfolder770 on Sun Jan 20, 2019 1:41 pm

I get nothing, it just returns me to the terminal prompt without any output

Subfolder770
 
Posts: 7
Joined: Sat Jan 05, 2019 12:55 pm

Re: CRICKIT library problems

by adafruit_support_mike on Mon Jan 21, 2019 1:31 am

That means the libraries weren't installed where they're supposed to be.

Let's brute-force things to find out where they did go:

Code: Select all | TOGGLE FULL SIZE
sudo find / -name "adafruit*"
That may take as much as a few hours to run. It will look at every file on the SD card.

adafruit_support_mike
 
Posts: 56486
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.