我正在尝试安装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发布于 2019-04-09 00:57:20
Python版本
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)。仅使用conda-forge通道是不可能安装fiona=1.6的。我的建议是在您的配置中同时使用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,那么将一个需求文件放在一起可能会更干净,如下所示
fiona_1_6.yaml
name: fiona_1_6
channels:
- conda-forge
- defaults
dependencies:
- python=3.5
- fiona=1.6
- osmnx然后使用以下命令创建新环境:
conda env create -f fiona_1_6.yaml发布于 2019-04-09 00:41:23
按照错误消息告诉我的去做,
要搜索可能提供您正在查找的
包的备用频道,请导航到https://anaconda.org
在搜索框中输入gdal将我带到https://anaconda.org/conda-forge/gdal,它有以下安装说明:
conda install -c conda-forge gdal=1.11.4
也许可以试着安装gdal依赖项?
https://stackoverflow.com/questions/55577991
复制相似问题