Can't install csv parser

B

BogAl

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
 
B

Bernard Delmée

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.
 
B

BogAl

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;..."

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.
 
D

Dave Cole

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?

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
 
D

Dave Cole

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

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

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

- Dave
 
J

John Machin

BogAl said:
Thanks for the reply, Dave....


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
 
J

John Machin

BogAl said:
Thanks for the reply, Bernard....


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.
 
B

BogAl

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?
 
B

BogAl

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
 
S

Skip Montanaro

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
 
B

BogAl

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top