我正试图从Anaconda导入Geopandas到我的Jupyter Notebook。安装似乎可以正常工作,但是当我尝试导入软件包时,出现以下错误:
ImportError Traceback (most recent call last)
<ipython-input-3-e7e84a190af7> in <module>
3 import pandas as pd
4 import numpy as np
----> 5 import geopandas as gpd
6 import matplotlib as mp
7 import matplotlib.pyplot as plt
~\AppData\Local\Continuum\anaconda3\lib\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
~\AppData\Local\Continuum\anaconda3\lib\site-packages\geopandas\io\file.py in <module>
1 import os
2
----> 3 import fiona
4 import numpy as np
5 import six
~\AppData\Local\Continuum\anaconda3\lib\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
~\AppData\Local\Continuum\anaconda3\lib\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: DLL load failed: Le module spécifié est introuvable.
我从forge安装了Geopandas:
conda install -c conda-forge geopandas
安装的版本是:geopandas 0.4.0 py_1 conda forge(我也有fiona 1.7.10 py36hfa6e2cd_2的版本)。
我已经尝试用不同的方式安装geopandas,但它并没有改变任何东西...
感谢您的帮助。
答案 0 :(得分:1)
解决方案:我发现了另一种安装Geopandas的方法。我做了什么:
conda install fiona pyproj six
pip install geopandas
conda upgrade --all
它有效!