[英]How to install fiona 1.6?
我正在尝试安装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
, 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
Conda Forge频道仅针对Python 2.7、3.4和3.5具有gdal v1.11.4 。 您要么需要使用较新版本的Fiona(当前版本为1.8),要么要创建一个包含这些Python旧版本之一的新环境。
例如,
conda create -n fiona_1_6 fiona=1.6 python=3.5
defaults
是必需的 您面临的另一个问题是,您已从配置中删除了defaults
频道(根据conda info
)。 仅使用conda-forge
通道安装fiona=1.6
是不可能的。 我的建议是在配置中同时包含conda-forge
和defaults
,但是只需将conda-forge
设置为具有更高的优先级即可(如果这就是您想要的)。 你可以这样做
conda config --append channels defaults
如果您确实不想包括defaults
,而只想使用临时解决方法,则只需使用--channels | -c
来运行第一个命令即可--channels | -c
--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
执行错误消息告诉我的操作,
要搜索可能提供您所需的conda软件包的备用渠道,请导航至https://anaconda.org
并在搜索框中输入gdal
导致我进入https://anaconda.org/conda-forge/gdal ,它具有以下安装说明:
conda install -c conda-forge gdal=1.11.4
尝试安装gdal
依赖项吗?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.