From: David P. C. <dav...@gm...> - 2009-01-28 18:41:05
|
Hello, I am having problems installing PyUSB for Cygwin. I've downloaded pyusb-0.4.1.tar.gz from: http://pyusb.berlios.de/ http://sourceforge.net/projects/pyusb --- Then, based on the README file, I follow the steps: -install cygwin -download and execute libusb-win32-filter-bin-0.1.12.1.exe from http://libusb-win32.sourceforge.net $ cp /cygdrive/c/Program\ Files/LibUSB-Win32/lib/gcc/libusb.a /usr/lib/ $ cp /cygdrive/c/Program Files/LibUSB-Win32/src/src/usb.h /usr/include/ $ tar -xvzf pyusb-0.4.1.tar.gz $ cd pyusb-0.4.1 $ python setup.py install running install running build running build_ext running install_lib running install_egg_info Removing /usr/lib/python2.5/site-packages/pyusb-0.4.1-py2.5.egg-info Writing /usr/lib/python2.5/site-packages/pyusb-0.4.1-py2.5.egg-info ++++++++++++++ So, the installation seems to work. However, I try with: $ cd samples $ python usbenum.py Traceback (most recent call last): File "usbenum.py", line 7, in <module> import usb ImportError: No such file or directory ---- and it does not work. What can be the problem? Best regards, DAvid |
From: Wander L. <wan...@gm...> - 2009-01-28 19:09:37
|
Is the usb.pyd in the site-packages file? (or usb.dll) 2009/1/29 David Portabella Clotet <dav...@gm...>: > Hello, > > I am having problems installing PyUSB for Cygwin. > > I've downloaded pyusb-0.4.1.tar.gz from: > http://pyusb.berlios.de/ > http://sourceforge.net/projects/pyusb > > --- > Then, based on the README file, I follow the steps: > > -install cygwin > > -download and execute libusb-win32-filter-bin-0.1.12.1.exe from > http://libusb-win32.sourceforge.net > > $ cp /cygdrive/c/Program\ Files/LibUSB-Win32/lib/gcc/libusb.a /usr/lib/ > $ cp /cygdrive/c/Program Files/LibUSB-Win32/src/src/usb.h /usr/include/ > > $ tar -xvzf pyusb-0.4.1.tar.gz > $ cd pyusb-0.4.1 > $ python setup.py install > running install > running build > running build_ext > running install_lib > running install_egg_info > Removing /usr/lib/python2.5/site-packages/pyusb-0.4.1-py2.5.egg-info > Writing /usr/lib/python2.5/site-packages/pyusb-0.4.1-py2.5.egg-info > > ++++++++++++++ > So, the installation seems to work. > However, I try with: > > $ cd samples > $ python usbenum.py > Traceback (most recent call last): > File "usbenum.py", line 7, in <module> > import usb > ImportError: No such file or directory > > ---- > and it does not work. > > What can be the problem? > > > Best regards, > DAvid > > > > > ------------------------------------------------------------------------------ > This SF.net email is sponsored by: > SourcForge Community > SourceForge wants to tell your story. > http://p.sf.net/sfu/sf-spreadtheword > _______________________________________________ > Pyusb-users mailing list > Pyu...@li... > https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |
From: David P. C. <dav...@gm...> - 2009-01-28 19:28:46
|
Yes. See here: $ ls -l /usr/lib/python2.5/site-packages/ total 2150 -rwxr-x---+ 1 Administrator Users 119 Dec 2 15:30 README ... -rw-r--r-- 1 David None 385 Jan 28 19:38 pyusb-0.4.1-py2.5.egg-info -rwxr-xr-x 1 David None 476414 Jan 26 21:21 usb.dll (both user "David" and "Administrator" have administrator rights in WinXP) DAvid On Wed, Jan 28, 2009 at 8:09 PM, Wander Lairson <wan...@gm...>wrote: > Is the usb.pyd in the site-packages file? (or usb.dll) > > 2009/1/29 David Portabella Clotet <dav...@gm...>: > > Hello, > > > > I am having problems installing PyUSB for Cygwin. > > > > I've downloaded pyusb-0.4.1.tar.gz from: > > http://pyusb.berlios.de/ > > http://sourceforge.net/projects/pyusb > > > > --- > > Then, based on the README file, I follow the steps: > > > > -install cygwin > > > > -download and execute libusb-win32-filter-bin-0.1.12.1.exe from > > http://libusb-win32.sourceforge.net > > > > $ cp /cygdrive/c/Program\ Files/LibUSB-Win32/lib/gcc/libusb.a /usr/lib/ > > $ cp /cygdrive/c/Program Files/LibUSB-Win32/src/src/usb.h /usr/include/ > > > > $ tar -xvzf pyusb-0.4.1.tar.gz > > $ cd pyusb-0.4.1 > > $ python setup.py install > > running install > > running build > > running build_ext > > running install_lib > > running install_egg_info > > Removing /usr/lib/python2.5/site-packages/pyusb-0.4.1-py2.5.egg-info > > Writing /usr/lib/python2.5/site-packages/pyusb-0.4.1-py2.5.egg-info > > > > ++++++++++++++ > > So, the installation seems to work. > > However, I try with: > > > > $ cd samples > > $ python usbenum.py > > Traceback (most recent call last): > > File "usbenum.py", line 7, in <module> > > import usb > > ImportError: No such file or directory > > > > ---- > > and it does not work. > > > > What can be the problem? > > > > > > Best regards, > > DAvid > > |
From: Wander L. <wan...@gm...> - 2009-01-29 09:38:15
|
Probably libusb is not in your cygwin lib path. Try to run some C program demo therein... 2009/1/29 David Portabella Clotet <dav...@gm...>: > Yes. See here: > > $ ls -l /usr/lib/python2.5/site-packages/ > total 2150 > -rwxr-x---+ 1 Administrator Users 119 Dec 2 15:30 README > ... > -rw-r--r-- 1 David None 385 Jan 28 19:38 > pyusb-0.4.1-py2.5.egg-info > -rwxr-xr-x 1 David None 476414 Jan 26 21:21 usb.dll > > > (both user "David" and "Administrator" have administrator rights in WinXP) > > DAvid > > > On Wed, Jan 28, 2009 at 8:09 PM, Wander Lairson <wan...@gm...> > wrote: >> >> Is the usb.pyd in the site-packages file? (or usb.dll) >> >> 2009/1/29 David Portabella Clotet <dav...@gm...>: >> > Hello, >> > >> > I am having problems installing PyUSB for Cygwin. >> > >> > I've downloaded pyusb-0.4.1.tar.gz from: >> > http://pyusb.berlios.de/ >> > http://sourceforge.net/projects/pyusb >> > >> > --- >> > Then, based on the README file, I follow the steps: >> > >> > -install cygwin >> > >> > -download and execute libusb-win32-filter-bin-0.1.12.1.exe from >> > http://libusb-win32.sourceforge.net >> > >> > $ cp /cygdrive/c/Program\ Files/LibUSB-Win32/lib/gcc/libusb.a /usr/lib/ >> > $ cp /cygdrive/c/Program Files/LibUSB-Win32/src/src/usb.h /usr/include/ >> > >> > $ tar -xvzf pyusb-0.4.1.tar.gz >> > $ cd pyusb-0.4.1 >> > $ python setup.py install >> > running install >> > running build >> > running build_ext >> > running install_lib >> > running install_egg_info >> > Removing /usr/lib/python2.5/site-packages/pyusb-0.4.1-py2.5.egg-info >> > Writing /usr/lib/python2.5/site-packages/pyusb-0.4.1-py2.5.egg-info >> > >> > ++++++++++++++ >> > So, the installation seems to work. >> > However, I try with: >> > >> > $ cd samples >> > $ python usbenum.py >> > Traceback (most recent call last): >> > File "usbenum.py", line 7, in <module> >> > import usb >> > ImportError: No such file or directory >> > >> > ---- >> > and it does not work. >> > >> > What can be the problem? >> > >> > >> > Best regards, >> > DAvid >> > > |
From: Wander L. <wan...@gm...> - 2009-01-30 09:51:30
|
Well, I would try but as I am moving to a new house, my computer is inside a box. You could try open a interactive python session from site-packages directory and type: import usb If it works, we have a problem regarding python path. If it does not work, try this: ldd usb.dll And look if at the results to check if libusb dll is found. Let me know the results. PS: please, reply to mailing list, your doubt could be the doubt of others... ;) 2009/1/30 David Portabella Clotet <dav...@gm...>: > > > On Thu, Jan 29, 2009 at 10:38 AM, Wander Lairson <wan...@gm...> > wrote: >> >> Probably libusb is not in your cygwin lib path. Try to run some C >> program demo therein... > > i've tried with: > $ export LD_LIBRARY_PATH=/usr/lib/ > $ python usbenum.py > > but I get the same error. > (remember that I copied libusb.a from /cygdrive/c/Program\ > Files/LibUSB-Win32/lib/gcc/ to /usr/lib/ according to the pyusb manual) > > > outside cygwin, i've tried and it seems that libusb works: > $ "/cygdrive/c/Program Files/LibUSB-Win32/bin/testlibusb.exe" > Dev #0: 0000 - 0000 > Dev #1: Maxtor - Basics Desktop > Dev #2: 046D - 08B0 > > --- > i've used this package that lists the python installed packages: > http://code.activestate.com/recipes/440501/ > and I didn't find anything with "*usb*". > $ python pkgsearch.py >a.txt > /home/David/bb/pkgsearch.py:125: DeprecationWarning: the gopherlib module is > deprecated > M = load_module(pkgname, of, pathname, desc) > /home/David/bb/pkgsearch.py:125: DeprecationWarning: The sre module is > deprecated, please import re. > M = load_module(pkgname, of, pathname, desc) > /usr/lib/python2.5/xmllib.py:9: DeprecationWarning: The xmllib module is > obsolete. Use xml.sax instead. > warnings.warn("The xmllib module is obsolete. Use xml.sax instead.", > DeprecationWarning) > /home/David/bb/pkgsearch.py:125: DeprecationWarning: the rgbimg module is > deprecated > M = load_module(pkgname, of, pathname, desc) > > can you please try this and tell me if your find the usb packaged listed > here? > > or any other idea to try? > > Regards, > DAvid > > >> >> 2009/1/29 David Portabella Clotet <dav...@gm...>: >> > Yes. See here: >> > >> > $ ls -l /usr/lib/python2.5/site-packages/ >> > total 2150 >> > -rwxr-x---+ 1 Administrator Users 119 Dec 2 15:30 README >> > ... >> > -rw-r--r-- 1 David None 385 Jan 28 19:38 >> > pyusb-0.4.1-py2.5.egg-info >> > -rwxr-xr-x 1 David None 476414 Jan 26 21:21 usb.dll >> > >> > >> > (both user "David" and "Administrator" have administrator rights in >> > WinXP) >> > >> > DAvid >> > >> > >> > On Wed, Jan 28, 2009 at 8:09 PM, Wander Lairson >> > <wan...@gm...> >> > wrote: >> >> >> >> Is the usb.pyd in the site-packages file? (or usb.dll) >> >> >> >> 2009/1/29 David Portabella Clotet <dav...@gm...>: >> >> > Hello, >> >> > >> >> > I am having problems installing PyUSB for Cygwin. >> >> > >> >> > I've downloaded pyusb-0.4.1.tar.gz from: >> >> > http://pyusb.berlios.de/ >> >> > http://sourceforge.net/projects/pyusb >> >> > >> >> > --- >> >> > Then, based on the README file, I follow the steps: >> >> > >> >> > -install cygwin >> >> > >> >> > -download and execute libusb-win32-filter-bin-0.1.12.1.exe from >> >> > http://libusb-win32.sourceforge.net >> >> > >> >> > $ cp /cygdrive/c/Program\ Files/LibUSB-Win32/lib/gcc/libusb.a >> >> > /usr/lib/ >> >> > $ cp /cygdrive/c/Program Files/LibUSB-Win32/src/src/usb.h >> >> > /usr/include/ >> >> > >> >> > $ tar -xvzf pyusb-0.4.1.tar.gz >> >> > $ cd pyusb-0.4.1 >> >> > $ python setup.py install >> >> > running install >> >> > running build >> >> > running build_ext >> >> > running install_lib >> >> > running install_egg_info >> >> > Removing /usr/lib/python2.5/site-packages/pyusb-0.4.1-py2.5.egg-info >> >> > Writing /usr/lib/python2.5/site-packages/pyusb-0.4.1-py2.5.egg-info >> >> > >> >> > ++++++++++++++ >> >> > So, the installation seems to work. >> >> > However, I try with: >> >> > >> >> > $ cd samples >> >> > $ python usbenum.py >> >> > Traceback (most recent call last): >> >> > File "usbenum.py", line 7, in <module> >> >> > import usb >> >> > ImportError: No such file or directory >> >> > >> >> > ---- >> >> > and it does not work. >> >> > >> >> > What can be the problem? >> >> > >> >> > >> >> > Best regards, >> >> > DAvid >> >> >> > >> > >> >> >> ------------------------------------------------------------------------------ >> This SF.net email is sponsored by: >> SourcForge Community >> SourceForge wants to tell your story. >> http://p.sf.net/sfu/sf-spreadtheword >> _______________________________________________ >> Pyusb-users mailing list >> Pyu...@li... >> https://lists.sourceforge.net/lists/listinfo/pyusb-users > > |
From: David P. C. <dav...@gm...> - 2009-01-31 23:33:48
|
Hello again Wander, Here it is what I tried: $ cd /usr/lib/python2.5/site-packages/ $ echo "import usb" >test.py $ python test.py Traceback (most recent call last): File "test.py", line 1, in <module> import usb ImportError: No such file or directory It doesn't like as a python path problem. There is not ldd in cygwin, but I found an alternative ldd.sh here: http://lassauge.free.fr/cygwin/archive.htm $ ldd.sh /usr/lib/python2.5/site-packages/usb.dll C:\cygwin\lib\python2.5\site-packages\usb.dll C:\cygwin\bin\cygwin1.dll C:\WINDOWS\system32\ADVAPI32.DLL C:\WINDOWS\system32\KERNEL32.dll C:\WINDOWS\system32\ntdll.dll C:\WINDOWS\system32\RPCRT4.dll C:\WINDOWS\system32\Secur32.dll Error: could not find cygusb0.dll C:\cygwin\bin\libpython2.5.dll It has a problem finding "cygusb0.dll". any idea? I looked for such a file: $ find / | grep -i .*usb.*dll.* here some relevant results: /cygdrive/c/WINDOWS/system32/libusb0.dll /lib/python2.5/site-packages/usb.dll /usr/lib/python2.5/site-packages/usb.dll and $ find / | grep -i ".*usb.*\.a.*" /cygdrive/c/Program Files/LibUSB-Win32/lib/gcc/libusb.a /lib/libusb.a /lib/w32api/libusbcamd.a /lib/w32api/libusbcamd2.a /usr/lib/libusb.a /usr/lib/w32api/libusbcamd.a /usr/lib/w32api/libusbcamd2.a but not cygusb0.dll file found. Regards, DAvid On Fri, Jan 30, 2009 at 10:51 AM, Wander Lairson <wan...@gm...>wrote: > Well, I would try but as I am moving to a new house, my computer is > inside a box. > You could try open a interactive python session from site-packages > directory and type: > > import usb > > If it works, we have a problem regarding python path. If it does not > work, try this: > > ldd usb.dll > > And look if at the results to check if libusb dll is found. > Let me know the results. > > PS: please, reply to mailing list, your doubt could be the doubt of > others... ;) > > |
From: Wander L. <wan...@gm...> - 2009-02-02 09:56:56
|
Hmmm... I think this file is a libusb dependency for cygwin... I guess this a question to libusb guys. Would mind asking it at libusb mailing list? Wander 2009/2/1 David Portabella Clotet <dav...@gm...>: > Hello again Wander, > > Here it is what I tried: > $ cd /usr/lib/python2.5/site-packages/ > $ echo "import usb" >test.py > $ python test.py > Traceback (most recent call last): > File "test.py", line 1, in <module> > import usb > ImportError: No such file or directory > > It doesn't like as a python path problem. > There is not ldd in cygwin, but I found an alternative ldd.sh here: > http://lassauge.free.fr/cygwin/archive.htm > > $ ldd.sh /usr/lib/python2.5/site-packages/usb.dll > C:\cygwin\lib\python2.5\site-packages\usb.dll > C:\cygwin\bin\cygwin1.dll > C:\WINDOWS\system32\ADVAPI32.DLL > C:\WINDOWS\system32\KERNEL32.dll > C:\WINDOWS\system32\ntdll.dll > C:\WINDOWS\system32\RPCRT4.dll > C:\WINDOWS\system32\Secur32.dll > Error: could not find cygusb0.dll > C:\cygwin\bin\libpython2.5.dll > > It has a problem finding "cygusb0.dll". > any idea? > > I looked for such a file: > $ find / | grep -i .*usb.*dll.* > here some relevant results: > /cygdrive/c/WINDOWS/system32/libusb0.dll > /lib/python2.5/site-packages/usb.dll > /usr/lib/python2.5/site-packages/usb.dll > > and > $ find / | grep -i ".*usb.*\.a.*" > /cygdrive/c/Program Files/LibUSB-Win32/lib/gcc/libusb.a > /lib/libusb.a > /lib/w32api/libusbcamd.a > /lib/w32api/libusbcamd2.a > /usr/lib/libusb.a > /usr/lib/w32api/libusbcamd.a > /usr/lib/w32api/libusbcamd2.a > > > but not cygusb0.dll file found. > > > Regards, > DAvid > > > > On Fri, Jan 30, 2009 at 10:51 AM, Wander Lairson <wan...@gm...> > wrote: >> >> Well, I would try but as I am moving to a new house, my computer is >> inside a box. >> You could try open a interactive python session from site-packages >> directory and type: >> >> import usb >> >> If it works, we have a problem regarding python path. If it does not >> work, try this: >> >> ldd usb.dll >> >> And look if at the results to check if libusb dll is found. >> Let me know the results. >> >> PS: please, reply to mailing list, your doubt could be the doubt of >> others... ;) >> > > |