pysal / segregation

Segregation Measurement, Inferential Statistics, and Decomposition Analysis
https://pysal.org/segregation/
BSD 3-Clause "New" or "Revised" License
112 stars 26 forks source link

ModuleNotFoundError: No module named 'segregation.spatial' #129

Closed MyrnaSastre closed 5 years ago

MyrnaSastre commented 5 years ago

I'm getting this ModuleNotFoundError:

image

I have segregation (1.1.1) and PySAL 2.1.0 in my environment.

Any suggestions? Thanks!

renanxcortes commented 5 years ago

hm... weird, this is not supposed to be happening, could you share a reproducible script? Also, did you type segregation.__version__ to check if it is indeed version 1.1.1?

renanxcortes commented 5 years ago

In addition, to see if it is gonna work, try changing your code to:

import segregation
index = segregation.spatial.SpatialDissim(gdf, 'variable_name_1', 'variable_name_2')
type(index)
renanxcortes commented 5 years ago

I'm closing this, since me and @myrnasastre check here locally that this was due to the usage of an older version of segregation. Newer version, like, 1.1.1, shall not present this issue.