Retaliation icon indicating copy to clipboard operation
Retaliation copied to clipboard

USB core error import on mac

Open rabbadab opened this issue 11 years ago • 5 comments
trafficstars

Hi, Maybe this is because i'm new to Python but I can't find a solution to this error I get when I try to run the script.

Traceback (most recent call last): File "retaliation.py", line 83, in import usb.core ImportError: No module named usb.core

I have installed the libusb with homebrew on my mac and I have also tried to install python again with homebrew to make new paths.

rabbadab avatar May 06 '14 07:05 rabbadab

It's been a while since I've installed Retaliation on a Mac. The error suggests that python's USB support. Libusb is a requirement but you'll also need USB support in Python.

I found this post on Stack Overflow. It may help:

http://stackoverflow.com/questions/6213361/python-pyusb-import-usb-core-doesnt-work

Let me know if any of the suggestions work.

codedance avatar May 06 '14 08:05 codedance

I had the same problem as you @rabbadab. All I had to do was to install python using homebrew and then in a new shell:

$ which python
/usr/local/bin/python

$ pip install pyusb
Collecting pyusb
  Downloading pyusb-1.0.0b2.tar.gz (57kB)
    100% |████████████████████████████████| 61kB 2.0MB/s
Installing collected packages: pyusb
  Running setup.py install for pyusb
Successfully installed pyusb-1.0.0b2

jtheoof avatar May 19 '15 16:05 jtheoof

Thanks @jtheoof So you've had to install pyusb with pip? Do you think a change to the README would help? e.g.

On a mac system, run the following commands:

brew install libusb
pip install pyusb

codedance avatar May 20 '15 08:05 codedance

Yes this is definitely the right steps. However I was not able to pass the kernel extension issues with Yosemite. See #20.

jtheoof avatar May 20 '15 18:05 jtheoof

To more correct @codedance, the install process on os x would be:

brew install python # also installs pip
brew install libusb 
pip install pyusb

jtheoof avatar May 20 '15 18:05 jtheoof