ModuleNotFoundError: No module named 'usb' in python
Question:
To read a file from usb device used ‘usb’ package but im not able to import that package.
**But in my python and virtual environment there is usb module installed and it present there but still im getting this error **
Im trying to read file from my usb storage using ‘usb’ package
Simple i need to read the file inside my usb using python (the file located inside the usb)and i don’t understand abot this error"
These are the installed packages
~/PycharmProjects/pythonProject$ pip freeze
asciitable==0.8.0
monitoring==0.9.12
psutil==5.9.0
pyudev==0.23.2
pyusb==1.2.1
six==1.16.0
usb==0.0.83.dev0
the blow attached link that im refered now so access the usb device https://github.com/pyusb/pyusb/blob/master/docs/tutorial.rst
If any one know how to read a file that located inside the USB storage using python .kindly please help
Answers:
1 .First make sure that you are installed this package under the right ven if not please install on that environment
2. sometimes its happens like this so just restart the pycharm and re-run the code
Make sure to install pyusb (see https://pypi.org/project/pyusb/) with pip install pyusb
and not usb.
Then you should be able to import usb
and use it as expected.
To read a file from usb device used ‘usb’ package but im not able to import that package.
**But in my python and virtual environment there is usb module installed and it present there but still im getting this error **
Im trying to read file from my usb storage using ‘usb’ package
Simple i need to read the file inside my usb using python (the file located inside the usb)and i don’t understand abot this error"
These are the installed packages
~/PycharmProjects/pythonProject$ pip freeze
asciitable==0.8.0
monitoring==0.9.12
psutil==5.9.0
pyudev==0.23.2
pyusb==1.2.1
six==1.16.0
usb==0.0.83.dev0
the blow attached link that im refered now so access the usb device https://github.com/pyusb/pyusb/blob/master/docs/tutorial.rst
If any one know how to read a file that located inside the USB storage using python .kindly please help
1 .First make sure that you are installed this package under the right ven if not please install on that environment
2. sometimes its happens like this so just restart the pycharm and re-run the code
Make sure to install pyusb (see https://pypi.org/project/pyusb/) with pip install pyusb
and not usb.
Then you should be able to import usb
and use it as expected.