geopandas - AttributeError: module 'geopandas' has no attribute 'read_file'

SOOYEON·2022년 9월 20일
0

geopandas

목록 보기
2/3

Error

---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
Cell In [16], line 4
      1 import geopandas as gpd
      2 # from geopandas import GeoSeries, GeoDataFrame
----> 4 df = gpd.read_file('data/LSMD_ADM_SECT_UMD_41.shp', encoding='cp949')
      5 df.head()

AttributeError: module 'geopandas' has no attribute 'read_file'

conda install

conda list


step 1

conda install -c conda-forge fiona shapely pyproj rtree

step 2

conda install -c conda-forge geopandas

step 3

pip install geopandas

output

Downloading and Extracting Packages
networkx-2.8.6       | 1.6 MB    | ##################################### | 100% 
geopandas-0.11.1     | 6 KB      | ##################################### | 100% 
munkres-1.1.4        | 12 KB     | ##################################### | 100% 
kiwisolver-1.4.4     | 76 KB     | ##################################### | 100% 
contourpy-1.0.5      | 234 KB    | ##################################### | 100% 
brotli-bin-1.0.9     | 19 KB     | ##################################### | 100% 
matplotlib-base-3.6. | 7.5 MB    | ##################################### | 100% 
cycler-0.11.0        | 10 KB     | ##################################### | 100% 
brotli-1.0.9         | 18 KB     | ##################################### | 100% 
geopandas-base-0.11. | 997 KB    | ##################################### | 100% 
jinja2-3.1.2         | 99 KB     | ##################################### | 100% 
joblib-1.2.0         | 205 KB    | ##################################### | 100% 
pillow-9.2.0         | 45.0 MB   | ##################################### | 100% 
unicodedata2-14.0.0  | 498 KB    | ##################################### | 100% 
libbrotlienc-1.0.9   | 287 KB    | ##################################### | 100% 
branca-0.5.0         | 26 KB     | ##################################### | 100% 
mapclassify-2.4.3    | 36 KB     | ##################################### | 100% 
libbrotlidec-1.0.9   | 33 KB     | ##################################### | 100% 
threadpoolctl-3.1.0  | 18 KB     | ##################################### | 100% 
libbrotlicommon-1.0. | 65 KB     | ##################################### | 100% 
scipy-1.9.1          | 26.2 MB   | ##################################### | 100% 
folium-0.12.1.post1  | 64 KB     | ##################################### | 100% 
markupsafe-2.1.1     | 22 KB     | ##################################### | 100% 
packaging-21.3       | 36 KB     | ##################################### | 100% 
pyparsing-3.0.9      | 79 KB     | ##################################### | 100% 
scikit-learn-1.1.2   | 8.2 MB    | ##################################### | 100% 
fonttools-4.37.2     | 1.9 MB    | ##################################### | 100% 
xyzservices-2022.9.0 | 38 KB     | ##################################### | 100% 
Preparing transaction: done
Verifying transaction: failed
EnvironmentNotWritableError: The current user does not have write permissions to the target environment.

+) "Verifying transaction: failed"

---> kernel restarting


Check

import geopandas as gpd
# from geopandas import GeoSeries, GeoDataFrame

df = gpd.read_file('data/LSMD_ADM_SECT_UMD_41.shp', encoding='cp949')
df.head()

참고

0개의 댓글