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

Document how to use on OS X #13

Open
probonopd opened this issue Jan 25, 2015 · 4 comments
Open

Document how to use on OS X #13

probonopd opened this issue Jan 25, 2015 · 4 comments

Comments

@probonopd
Copy link

The following works for me on OS X 10.9:

# Install prerequisites

$ sudo easy_install pyusb
(...) Installed /Library/Python/2.7/site-packages/pyusb-1.0.0b2-py2.7.egg

$ sudo easy_install libusb1
(...) Installed /Library/Python/2.7/site-packages/libusb1-1.3.0-py2.7.egg

$ brew install libusb

# Install python-usbtmc

$ git clone https://github.com/python-ivi/python-usbtmc.git
$ cd python-usbtmc
$ sudo python ./setup.py install
(...) Installed /Library/Python/2.7/site-packages/python_usbtmc-0.6-py2.7.egg

# Use python-usbtmc

$ python
(...)
>>> import usbtmc
>>> usbtmc.list_devices()
[<DEVICE ID 1ab1:04ce on Bus 253 Address 005>]

Note that I am using https://github.com/Homebrew/homebrew to install libusb.

@1am
Copy link

1am commented Mar 13, 2015

Thank you. It works!

@kisielk
Copy link

kisielk commented May 14, 2015

Hm, I have a Rigol DS1052E and got this installed successfully, but list_devices() returns an empty list. Has anyone got that working successfully ?

@kisielk
Copy link

kisielk commented May 14, 2015

Ah ha, I figured out the problem. In the "Utility" menu on the scope you need to set "USB Device" to "Computer" instead of "PictBridge". I was wondering why it was showing up as an imaging device...

@mojca
Copy link

mojca commented Jan 4, 2017

One way to install this package on Mac is via MacPorts:

sudo port install py36-usbtmc

(replace 36 with your favourite version of Python).

I spent quite some time trying to figure out if this was supposed to work on macOS at all (I was looking for /dev/usbtmc etc.) and then realized that it works "automatically". The most helpful command was

print(usbtmc.list_devices())

This should probably be mentioned somewhere as well.

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

4 participants