0

I'm trying to install dbfread in Python to read a database in Visual Foxpro, but when I import in my code I get this error below any suggestions why?

File "C:\Python37-32\pr_import.py", line 6, in from dbfread import DBF ModuleNotFoundError: No module named 'dbfread'

    from dbfread import DBF
user13470314
  • 27
  • 1
  • 8

3 Answers3

0

You should install this package first before importing it.

$ pip install dbfread

If you already install it, try uninstall and reinstall again.

Lab
  • 196
  • 3
  • 18
  • My Python folder is in my local disk drive how do I access it from command line? – user13470314 May 15 '20 at 13:08
  • What do you mean by Python folder? Do you mean the folder that you wrote the .py script? – Lab May 15 '20 at 13:09
  • No my folder where I first installed Python so I can pip install – user13470314 May 15 '20 at 13:12
  • How did you install python? By the installer from python.org website? If yes, the Python program already install **in** your computer. And next, you should install pip package: https://stackoverflow.com/questions/6587507/how-to-install-pip-with-python-3 After that, open your commander, type `pip install dbfread`, and it doesn't matter where you do it. After that, you should be able to run the python file without error. – Lab May 15 '20 at 13:19
  • Or do you install python with anaconda? – Lab May 15 '20 at 13:20
  • @user13470314 You're welcome. If that helps, you can press the check button next to my answer. – Lab May 15 '20 at 13:26
0

1.Open Command prompt

2.You should try

  $ pip install dbfread

3. if it doesnt work get .whl file from Here

then install by using

pip install "Path file downloaded".whl
amad durrani
  • 52
  • 11
0

I had the same problem under Linux - the code worked under Python2.

pip3 install dbfread-2.0.7-py2.py3-none-any.whl

helped.

P.S. From the command line, try:

dir c:\pip*.* /s

kaksi
  • 88
  • 6