Can't install csv parser

Discussion in 'Python' started by BogAl, Jul 13, 2003.

  1. BogAl

    BogAl Guest

    Hi, all....

    I'm hoping someone can help me. I've downloaded the csv.pyd file from
    http://www.object-craft.com.au/projects/csv/download.html
    and put it into my C:\Python22\DLLs directory. Typing

    import csv

    into a python window results in the following error message:

    Traceback (most recent call last):
    File "<pyshell#0>", line 1, in ?
    import csv
    ImportError: DLL load failed: One of the library files needed to run this
    application cannot be found.

    Can someone help me get this running?

    Thanks,
    BogAl
    BogAl, Jul 13, 2003
    #1
    1. Advertising

  2. > I'm hoping someone can help me. I've downloaded the csv.pyd file from
    > http://www.object-craft.com.au/projects/csv/download.html
    > and put it into my C:\Python22\DLLs directory.


    Mmh...works for me - ActivePython 2.2.2
    Are you sure you downloaded the pyd file corresponding to
    your python version? Running the MS "depends" utility on
    csv.pyd reveals that it only needs python22.dll, msvcrt.dll
    and kernel32.dll. Are these all on your PATH?

    > Traceback (most recent call last):
    > File "<pyshell#0>", line 1, in ?
    > import csv


    What's pyshell? did you try from good ole trusty python.exe
    in a DOS box?

    Hope this'll help you diagnose,

    Bernard.
    Bernard Delmée, Jul 13, 2003
    #2
    1. Advertising

  3. BogAl

    BogAl Guest

    Thanks for the reply, Bernard....

    > Mmh...works for me - ActivePython 2.2.2
    > Are you sure you downloaded the pyd file corresponding to
    > your python version?


    Yes, Python 2.2.2 here.


    > Running the MS "depends" utility on
    > csv.pyd reveals that it only needs python22.dll, msvcrt.dll
    > and kernel32.dll. Are these all on your PATH?
    >


    I think they are now....
    "...C:\WINDOWS\SYSTEM\python22.dll;C:\WINDOWS\SYSTEM\KERNEL32.dll;\C:
    \WINDOWS\SYSTEM\MSVCRT.dll;..."


    > > Traceback (most recent call last):
    > > File "<pyshell#0>", line 1, in ?
    > > import csv

    >
    > What's pyshell? did you try from good ole trusty python.exe
    > in a DOS box?


    No difference. Still the same error message.
    Any further help is greatly appreciated.
    BogAl, Jul 13, 2003
    #3
  4. BogAl

    Dave Cole Guest

    >>>>> "Bernard" == Bernard Delmée <> writes:

    >> I'm hoping someone can help me. I've downloaded the csv.pyd file
    >> from http://www.object-craft.com.au/projects/csv/download.html and
    >> put it into my C:\Python22\DLLs directory.


    Bernard> Mmh...works for me - ActivePython 2.2.2 Are you sure you
    Bernard> downloaded the pyd file corresponding to your python version?
    Bernard> Running the MS "depends" utility on csv.pyd reveals that it
    Bernard> only needs python22.dll, msvcrt.dll and kernel32.dll. Are
    Bernard> these all on your PATH?

    >> Traceback (most recent call last): File "<pyshell#0>", line 1, in ?
    >> import csv


    Bernard> What's pyshell? did you try from good ole trusty python.exe
    Bernard> in a DOS box?

    Try putting the .pyd in C:\Python22\Lib\site-packages

    - Dave

    --
    http://www.object-craft.com.au
    Dave Cole, Jul 14, 2003
    #4
  5. BogAl

    BogAl Guest

    Thanks for the reply, Dave....

    > Try putting the .pyd in C:\Python22\Lib\site-packages


    Unfortunately, I'm still getting the error message.

    :(
    BogAl, Jul 14, 2003
    #5
  6. BogAl

    Dave Cole Guest

    >>>>> "BogAl" == BogAl <> writes:

    BogAl> Thanks for the reply, Dave....

    >> Try putting the .pyd in C:\Python22\Lib\site-packages


    BogAl> Unfortunately, I'm still getting the error message.

    Does it work if you put the csv.pyd file in the current directory?

    - Dave

    --
    http://www.object-craft.com.au
    Dave Cole, Jul 15, 2003
    #6
  7. BogAl

    John Machin Guest

    BogAl <> wrote in message news:<>...
    > Thanks for the reply, Dave....
    >
    > > Try putting the .pyd in C:\Python22\Lib\site-packages

    >
    > Unfortunately, I'm still getting the error message.
    >


    I would suggest that you
    (1) Remove all your copies of csv.pyd
    (2) Install the csv module properly by following the instructions on
    Dave's website (i.e. briefly, you unpack the distribution into a
    directory, and then run setup.py)
    (3) If you still have a problem, post a message that shows
    (a) what version of Windows you are running
    (b) what version of Python
    (c) your windows path
    (d) your Python path (import sys; print sys.path)
    (e) what you get when you run Python (at the DOS command line!!) with
    -v and try to import the csv module
    (f) what the MS depends utility says about
    C:\Python22\Lib\site-packages\csv.pyd

    Another thought: I found I had a python22.dll (dated Oct 2002, must be
    from Python 2.2.2) in my c:\WINNT\system32 directory and one dated May
    2003 (must be from Python 2.2.3) in my c:\Python22 directory ... don't
    know how that happened; puzzling ... I've killed off the older one.
    You might like to search python22.dll *AND* msvcrt.dll and ensure that
    you are using the latest.

    HTH,
    John
    John Machin, Jul 15, 2003
    #7
  8. BogAl

    John Machin Guest

    BogAl <> wrote in message news:<>...
    > Thanks for the reply, Bernard....
    >
    > > Running the MS "depends" utility on
    > > csv.pyd reveals that it only needs python22.dll, msvcrt.dll
    > > and kernel32.dll. Are these all on your PATH?
    > >

    >
    > I think they are now....
    > "...C:\WINDOWS\SYSTEM\python22.dll;C:\WINDOWS\SYSTEM\KERNEL32.dll;\C:
    > \WINDOWS\SYSTEM\MSVCRT.dll;..."


    I think not; path should contain a list of *directories*, not *files*
    -- Windows is silently ignoring the non-existence of directories
    called "C:\WINDOWS\SYSTEM\python22.dll" etc.

    Rephrasing Bernard's question: do you have those 3 files in
    directories that are listed in your system path?

    After a normal Python installation, you would expect to have
    c:\Python22 in your path, and Python22.dll in that directory.
    John Machin, Jul 15, 2003
    #8
  9. BogAl

    BogAl Guest

    > >> Try putting the .pyd in C:\Python22\Lib\site-packages
    >
    > BogAl> Unfortunately, I'm still getting the error message.
    >
    > Dave> Does it work if you put the csv.pyd file in the current directory?


    Yes, it does. What does that mean I should do now?
    BogAl, Jul 15, 2003
    #9
  10. BogAl

    BogAl Guest

    Thanks for the reply, John....

    > I would suggest that you
    > (1) Remove all your copies of csv.pyd
    > (2) Install the csv module properly by following the instructions on
    > Dave's website (i.e. briefly, you unpack the distribution into a
    > directory, and then run setup.py)


    I tried this first; went to the suggested alternative second. Here's
    what happens when I run setup.py:

    C:\Python22\Lib\site-packages\csv>
    python.exe C:\PYTHON22\LIB\SITE-P~1\CSV\SETUP.PY

    usage: SETUP.PY [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
    or: SETUP.PY --help [cmd1 cmd2 ...]
    or: SETUP.PY --help-commands
    or: SETUP.PY cmd --help

    error: no commands supplied

    > (3) If you still have a problem, post a message that shows
    > (a) what version of Windows you are running
    > (b) what version of Python
    > (c) your windows path
    > (d) your Python path (import sys; print sys.path)
    > (e) what you get when you run Python (at the DOS command line!!) with
    > -v and try to import the csv module
    > (f) what the MS depends utility says about
    > C:\Python22\Lib\site-packages\csv.pyd
    >
    > Another thought: I found I had a python22.dll (dated Oct 2002, must be
    > from Python 2.2.2) in my c:\WINNT\system32 directory and one dated May
    > 2003 (must be from Python 2.2.3) in my c:\Python22 directory ... don't
    > know how that happened; puzzling ... I've killed off the older one.
    > You might like to search python22.dll *AND* msvcrt.dll and ensure that
    > you are using the latest.
    >
    > HTH,
    > John
    BogAl, Jul 15, 2003
    #10
  11. bogal> I tried this first; went to the suggested alternative second.
    bogal> Here's what happens when I run setup.py:

    bogal> C:\Python22\Lib\site-packages\csv>
    bogal> python.exe C:\PYTHON22\LIB\SITE-P~1\CSV\SETUP.PY

    bogal> usage: SETUP.PY [global_opts] cmd1 [cmd1_opts] [cmd2 [cmd2_opts] ...]
    bogal> or: SETUP.PY --help [cmd1 cmd2 ...]
    bogal> or: SETUP.PY --help-commands
    bogal> or: SETUP.PY cmd --help

    bogal> error: no commands supplied

    Setup.py needs to know what of several things you want to do (just build the
    package, build and install the package, build a distribution, etc). Try
    this command:

    python.exe C:\PYTHON22\LIB\SITE-P~1\CSV\SETUP.PY install

    That should do any necessary building and install all the files.

    Skip
    Skip Montanaro, Jul 15, 2003
    #11
  12. BogAl

    BogAl Guest

    > Setup.py needs to know what of several things you want to do (just build the
    > package, build and install the package, build a distribution, etc). Try
    > this command:
    >
    > python.exe C:\PYTHON22\LIB\SITE-P~1\CSV\SETUP.PY install
    >
    > That should do any necessary building and install all the files.
    >
    > Skip


    Thanks, Skip. I'm too used to just double-clicking things to run them
    and missed the part about supplying an argument.

    At least I've learned a couple of things and maybe improved my setup a
    bit in the process.

    BogAl
    BogAl, Jul 16, 2003
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Michal Mikolajczyk
    Replies:
    0
    Views:
    642
    Michal Mikolajczyk
    Feb 13, 2004
  2. Skip Montanaro
    Replies:
    0
    Views:
    707
    Skip Montanaro
    Feb 13, 2004
  3. Tintin92
    Replies:
    1
    Views:
    1,693
    Andrew Thompson
    Feb 14, 2007
  4. jliu66
    Replies:
    0
    Views:
    504
    jliu66
    Oct 19, 2007
  5. sso
    Replies:
    20
    Views:
    2,652
    Martin Gregorie
    Apr 26, 2009
Loading...

Share This Page