My problem is when I try to import usb.core
or usb
or just usb.util
outside the shell window, in a new window. When I hit run, on the shell windows its says
"ImportError: No module named core".
But when I import usb
on the shell window or in python command line it works fine!!
Your PYTHONPATH is being set differently in the shell than in your target window.
Run this code to be sure:
import sys
print sys.path
Compare on both platforms.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.