[英]Mac geopandas import error
I am having some trouble trying to import geopandas in my Mac. 尝试在Mac中导入Geopandas时遇到了一些麻烦。 I installed it by the conda command:
我通过conda命令安装了它:
conda install -c conda-forge geopandas
After I try to import by I get the following error: 在尝试通过导入后,出现以下错误:
ImportError Traceback (most recent call last)
<ipython-input-2-e508418be6dd> in <module>()
1 import pandas as pd
----> 2 import geopandas as gpd
3 get_ipython().magic('matplotlib inline')
/anaconda/lib/python3.6/site-packages/geopandas/__init__.py in <module>()
2 from geopandas.geodataframe import GeoDataFrame
3
----> 4 from geopandas.io.file import read_file
5 from geopandas.io.sql import read_postgis
6 from geopandas.tools import sjoin
/anaconda/lib/python3.6/site-packages/geopandas/io/file.py in <module>()
1 import os
2
----> 3 import fiona
4 import numpy as np
5
/anaconda/lib/python3.6/site-packages/fiona/__init__.py in <module>()
67 from six import string_types
68
---> 69 from fiona.collection import Collection, BytesCollection, vsi_path
70 from fiona._drivers import driver_count, GDALEnv
71 from fiona.drvsupport import supported_drivers
/anaconda/lib/python3.6/site-packages/fiona/collection.py in <module>()
7
8 from fiona import compat
----> 9 from fiona.ogrext import Iterator, ItemsIterator, KeysIterator
10 from fiona.ogrext import Session, WritingSession
11 from fiona.ogrext import (
ImportError: dlopen(/anaconda/lib/python3.6/site-packages/fiona/ogrext.cpython-36m-darwin.so, 2): Library not loaded: @rpath/libxerces-c-3.1.dylib
Referenced from: /anaconda/lib/libgdal.20.dylib
Reason: image not found
I tried updating my anaconda by running: 我尝试通过运行以下命令来更新我的蟒蛇:
conda update conda
Got the same error, so I tried uninstalling with conda and installing with pip. 遇到相同的错误,因此我尝试使用conda卸载并使用pip安装。 Got the same error.
得到了同样的错误。
Then I tried to forge fiona with conda,then installing with pip but it got me nowhere, and now I'm stuck. 然后我试图用conda伪造fiona,然后用pip进行安装,但是却无济于事,现在我被卡住了。 Any ideas?
有任何想法吗?
I think could have been a problem with the conda-forge feedstock for fiona: https://github.com/conda-forge/fiona-feedstock/issues/62 我认为可能是fiona的conda-forge原料存在问题: https : //github.com/conda-forge/fiona-feedstock/issues/62
I had the same problem a few days ago but it seems to have been resolved now. 几天前我遇到了同样的问题,但现在似乎已经解决了。 Have you tried again?
你再试一次吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.