So, I want to communicate with a USB device in python, but pyusb won't install (is not compatible?) with python 2.7 and windows7. Within the current project, updating python to a newer 2.X version is no option. Pyusb can't be the only option communicating with a USB device... Any solutions/tips?
Asked
Active
Viewed 881 times
0
-
I think you mixed up your version of python. The last 1.X version was release twelve years ago, and I'm not even sure there was a 1.7. If you're not talking about the version of the python interpreter, could you be more precise ? – madjar Jul 04 '12 at 11:38
-
You're right, 2.7 is what I meant. Anyway, when I try to install pyusb it says 'python is not recognized as an internal or external command'. I was told it is not compatible with windows7. Is this correct/are there alternatives? – Jen V Jul 04 '12 at 11:43
-
From a quick google search, there seems to be no incompatibility between pyusb and windows 7. One of common problem seems to be 32bits/64bits mixups. You may find more information in this question : http://stackoverflow.com/questions/5385281/pyusb-on-windows-7-cannot-find-any-devices – madjar Jul 04 '12 at 11:48
1 Answers
0
The issue you're having as you noted in your comment is not attributed to incompatibilities with Python and PyUSB, but the fact that the Python path does not get automatically added to your PATH variable in the Windows Environment Settings.
- Right-Click My Computer
- Properties
- Advanced System Settings
- Environment Variables
- Select Path from the System Variables box and click EDIT
- Add your Python path to the end of the line, preceding it with a semi-colon if needed (for eg. ;C:\Python27)
- Ok out all the windows
- Restart your command window, and install the package.

Christian Witts
- 11,375
- 1
- 33
- 46
-
Thanks, I'm still having problems though. A new error occurred, saying can't open file 'setup.py': no such file or directory. I've tried copy pasting the pyusb-1.0.0 folder in the tools folder from python27, I've tried copying setup.py to C:\Python27, but still to no avail... Got any suggestions? – Jen V Jul 04 '12 at 11:55
-
Make sure you're running the `python setup.py install` command from the folder that contains the PyUsb setup file. Alternatively, you can always use `easy_install` and just run `easy_install pyusb` which should retrieve and install `pyusb 1.0.0a2` as that's what I just got. If you don't have `easy_install` on your system you can get it here http://pypi.python.org/pypi/setuptools#files – Christian Witts Jul 04 '12 at 11:59
-
Thanks, I forgot to redirect to the C:\Python27\Tools folder from the cmd line. Not my brightest moment... But, I've now succesfully compiled a program importing the usb.core module, so everything looks fine. Thanks for the help! – Jen V Jul 04 '12 at 12:14