Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

USB core error import on mac #13

Open
rabbadab opened this issue May 6, 2014 · 5 comments
Open

USB core error import on mac #13

rabbadab opened this issue May 6, 2014 · 5 comments

Comments

@rabbadab
Copy link

rabbadab commented May 6, 2014

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.

@codedance
Copy link
Owner

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.

@jtheoof
Copy link

jtheoof commented May 19, 2015

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

@codedance
Copy link
Owner

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

@jtheoof
Copy link

jtheoof commented May 20, 2015

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

@jtheoof
Copy link

jtheoof commented May 20, 2015

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

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants