-1

I am using Pycharm in Windows 10, and I need to import Pysal to make some data transformations using DBF files with Pandas.

For that I have:

import pysal as ps
import pandas as pd
db = ps.open(dbfile) #Pysal to open DBF
d = {col: dbfile.by_col(col) for col in dbfile.header}

I have to install pysal packages but when I run "pip install pysal" I got the following error:

    raise OSError("could not find or load %s" % lib_name)
    OSError: could not find or load spatialindex_c-32.dll
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

How I can install pysal on my environment?

Thanks!

Pedro Alves
  • 1,004
  • 1
  • 21
  • 47

1 Answers1

0

The easiest thing you can do is to download it from Christoph Gohlke's site. You can install the whl file in your virtual environment by running

pip install [path to the whl file]

in your pycharm terminal.

Nipun Thennakoon
  • 3,586
  • 1
  • 18
  • 26
  • I've tried that but: ERROR: Cannot determine archive format of \AppData\Local\Temp\pip-req-build-9xmwwwwo – Pedro Alves Nov 28 '20 at 16:50
  • forgive me if I'm being rude, but did you give the full path of the whl file. Up intill the .whl extension? Because it worked for me. – Nipun Thennakoon Nov 28 '20 at 17:08
  • Nipun, yes I am passing the complete path but I'm getting this error: ERROR: A GDAL API version must be specified. Provide a path to gdal-config using a GDAL_CONFIG environment variable or use a GDAL_VERSION environment variable. – Pedro Alves Nov 29 '20 at 13:10