Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ImportError: No module named usb
24-11-2011, 07:00 PM,
#1
ImportError: No module named usb
Hi, I encountered some problems on Pinguino32X r208 setup.exe.exe version that
installed to c:\pinguino32.
My environment is Windows XP SP3.

In case that Target Board: Generic 18F2550
First I could not upload to target when pushed the write button on Vascoboot window.
Error is as follows,
------------------
Traceback (most recent call last):
File "pinguinobetax2.py", line 1036, in OnUpload
File "C:\pinguino32X\library\win32\p8\bin\vascoboot1.3.py", line 34, in <module>
import usb
ImportError: No module named usb
------------------
This problem is mentioned here.
http://tutorial.cytron.com.my/2011/08/18...window-xp/
I looked at svn repository rev.225 (latest revision), but the issue is still there.
I've confirmed that this issue would be solved just adding 'import usb' statement to pinguninobetax2.py,
at least in my environment.

Pinguino-beta9-05_windows dosen't have this issue because 'import usb' statement is defined
in pinguinobeta9-05windows.py.

Please refer to http://docs.python.org/library/functions.html#execfile,
especialy describing that
'If both dictionaries are omitted, the expression is executed in the environment
where execfile is called.'

In other words, 'import usb' statement in vascoboot1.3.py is ignored when called from execfile() function
so that pinguninobetax2.py must have the statement.

Would anybody confirm above solution ?


avrin
Reply
29-11-2011, 08:48 PM, (This post was last modified: 30-11-2011, 12:45 AM by Victor.)
#2
RE: ImportError: No module named usb
I'm experiencing the same problem, same WIN installer version....
Compling ok but unable to upload anything to the target (18f2550 board).
Now some test under Linux, but there my logic analyzer doesn't work, SGRUNT !!

tnx alot for any suggestion Wink

##### UPDATE #####

under Linux all works fine !!!!
Reply
17-12-2011, 02:41 AM,
#3
RE: ImportError: No module named usb
I have the same problem. Under Ubuntu works perfectly, but in WIN7 ...ImportError: No module named usb

Windows detects pinguino 8 bits (18F2550) but i can't program.

I've installed all several times and nothing.
  • python 2.6.6
  • wxpython 2.8
  • pyusb 0.4
  • pyserial
  • PinguinoBetax2
  • lib-usb 1.2.5


Suggestions???

Thanks!!!
Reply
17-12-2011, 06:00 PM,
#4
RE: ImportError: No module named usb
The first post says to add an import usb

Did that not work?
Reply
18-12-2011, 01:10 AM,
#5
RE: ImportError: No module named usb
Hi!
(17-12-2011, 06:00 PM)pingotg Wrote: The first post says to add an import usb

Did that not work?

No, didn't works. I've added "import usb" in all "pinguinobetax2.py" and give me same error.
Seems the problem is not in python usb. I've installed pyusb several times and seems installed correctly.
I have IDE beta 9.05 and X.2 installed in the same computer. I can program pinguino with beta 9.05, but not with X.2.

I tried to install X.2 in two diferent computer under Win 7, and none can upload a program Sad

any sugestion is wellcome...

greetings
Reply
18-12-2011, 01:51 AM,
#6
RE: ImportError: No module named usb
Seems to work for the OP on Win XP but not for you on Win7. Perhaps the clue is there.

(I don't use Windows. Gave it up years ago. Fed up with the endless pain.)
Reply
18-12-2011, 02:01 AM,
#7
RE: ImportError: No module named usb
I'm not alone...

https://groups.google.com/group/pinguino...2e15?hl=es

And i think Furri uses XP... Fortunately under Ubuntu all works fine.

Greetings!!!

Reply
18-12-2011, 03:52 PM, (This post was last modified: 18-12-2011, 03:53 PM by pingotg.)
#8
RE: ImportError: No module named usb
Reading that and thinking more. If the error is "No module named usb" then it seems to me that it means it cannot find the python module whose name is usb. So, it's not installed or not installed properly or not named usb or not in an appropriate search path or some such.

John
Reply
19-12-2011, 01:04 AM,
#9
RE: ImportError: No module named usb
Hi, Bastian
I want to confirm only about Pinguinobetax2 installed and executed steps.

1. Download "x.2.tar.bz2" from here,
http://www.pinguino.cc/download/testing/x.2.tar.bz2
and unbzip2 to for instance c:\x.2 folder.
2. Download "win32.tar.bz2" from here,
http://www.pinguino.cc/download/testing/win32.tar.bz2
and unbzip2 to the same folder.
3. Add 'import usb' statement in c:\x.2\pinguinobetax2.py, as follows,
...
import sys
import os
import time
import usb # Add this line. (line 96)
...
4. Double click c:\x.2\pinguinobetax2.py to execute Pinguino IDE.


It is not necessary to install and setup Pinguinobetax2_fix.zip.

Reply
22-12-2011, 11:53 AM, (This post was last modified: 22-12-2011, 09:42 PM by Bastian.)
#10
RE: ImportError: No module named usb
(19-12-2011, 01:04 AM)avrin Wrote: Hi, Bastian
I want to confirm only about Pinguinobetax2 installed and executed steps.

1. Download "x.2.tar.bz2" from here,
....
WORKS!!!!
The problem is in the installer file. I downloaded and installed "Pinguino32X r208 setup.exe.exe", but it doesn't work.

This works for me (win7 32 bits)
after this, vasco bootloader runs and i can program pinguino. GREAT!!!!

Thank you very much!!!!!

Grettings!
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)