我正在尝试安装fiona=1.6
,但出现以下错误
conda install fiona=1.6
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: done
Solving environment: -
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
- conda-forge/noarch::flask-cors==3.0.7=py_0
- conda-forge/osx-64::blaze==0.11.3=py36_0
- conda-forge/noarch::flask==1.0.2=py_2
failed
PackagesNotFoundError: The following packages are not available from current channels:
- fiona=1.6 -> gdal==1.11.4
Current channels:
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
如果我尝试安装gdal==1.11.4
,则会得到以下信息
conda install -c conda-forge gdal=1.11.4
WARNING: The conda.compat module is deprecated and will be removed in a future release.
Collecting package metadata: done
Solving environment: |
The environment is inconsistent, please check the package plan carefully
The following packages are causing the inconsistency:
- conda-forge/noarch::flask-cors==3.0.7=py_0
- conda-forge/osx-64::blaze==0.11.3=py36_0
- conda-forge/noarch::flask==1.0.2=py_2
failed
PackagesNotFoundError: The following packages are not available from current channels:
- gdal=1.11.4
Current channels:
- https://conda.anaconda.org/conda-forge/osx-64
- https://conda.anaconda.org/conda-forge/noarch
- https://repo.anaconda.com/pkgs/main/osx-64
- https://repo.anaconda.com/pkgs/main/noarch
- https://repo.anaconda.com/pkgs/free/osx-64
- https://repo.anaconda.com/pkgs/free/noarch
- https://repo.anaconda.com/pkgs/r/osx-64
- https://repo.anaconda.com/pkgs/r/noarch
To search for alternate channels that may provide the conda package you're
looking for, navigate to
https://anaconda.org
and use the search bar at the top of the page.
这是conda info
conda info
active environment : base
active env location : /anaconda3
shell level : 1
user config file : /Users/massaro/.condarc
populated config files : /Users/massaro/.condarc
conda version : 4.6.11
conda-build version : 3.17.8
python version : 3.6.8.final.0
base environment : /anaconda3 (writable)
channel URLs : https://conda.anaconda.org/conda-forge/osx-64
https://conda.anaconda.org/conda-forge/noarch
package cache : /anaconda3/pkgs
/Users/massaro/.conda/pkgs
envs directories : /anaconda3/envs
/Users/massaro/.conda/envs
platform : osx-64
user-agent : conda/4.6.11 requests/2.21.0 CPython/3.6.8 Darwin/17.5.0 OSX/10.13.4
UID:GID : 502:20
netrc file : None
答案 0 :(得分:0)
Conda Forge channel only has gdal v1.11.4 for Python 2.7, 3.4, and 3.5。您要么需要使用较新版本的Fiona(当前版本为1.8),要么要创建一个包含这些Python旧版本之一的新环境。
例如,
conda create -n fiona_1_6 fiona=1.6 python=3.5
defaults
您面临的另一个问题是,您已从配置中删除了defaults
频道(按照您的conda info
)。仅使用fiona=1.6
频道安装conda-forge
是不可能的。我的建议是在您的配置中同时包含conda-forge
和defaults
,但是只需将conda-forge
设置为具有更高的优先级(如果您要这样做)。您可以像这样
conda config --append channels defaults
如果您真的不想包含defaults
,而只想使用临时解决方法,则只需使用带有--channels | -c
标志的第一个命令即可
conda create -n fiona_1_6 -c conda-forge -c defaults fiona=1.6 python=3.5
这仍将赋予conda-forge
优先级,但允许从defaults
来获取缺少的依赖项。
如果您不仅需要Fiona,最好将需求文件放在一起,像这样
name: fiona_1_6
channels:
- conda-forge
- defaults
dependencies:
- python=3.5
- fiona=1.6
- osmnx
然后使用以下命令创建新环境:
conda env create -f fiona_1_6.yaml
答案 1 :(得分:-1)
执行错误消息告诉我的操作
要搜索可能提供conda软件包的备用渠道 寻找,导航至https://anaconda.org
并在搜索框中输入gdal
导致我进入https://anaconda.org/conda-forge/gdal,它具有以下安装说明:
conda install -c conda-forge gdal=1.11.4
尝试安装gdal
依赖项吗?