首页 > 解决方案 > 我应该为特定的 python 版本使用哪个模块版本?

问题描述

我有 Python 3.7.10,但是当我尝试导入 Georasters 时,我不断收到以下错误

Can't find requested entry point: GDALRegisterMe
Can't find requested entry point: GDALRegister_nitf
Can't find requested entry point: GDALRegisterMe
Can't find requested entry point: GDALRegister_nitf
C:\Program Files\Anaconda3\envs\environment_name\lib\site-packages\pysal\explore\segregation\network\network.py:16: UserWarning: You need pandana and urbanaccess to work with segregation's network module
You can install them with  `pip install urbanaccess pandana` or `conda install -c udst pandana urbanaccess`
  "You need pandana and urbanaccess to work with segregation's network module\n"
C:\Program Files\Anaconda3\envs\environment_name\lib\site-packages\pysal\model\spvcm\abstracts.py:10: UserWarning: The `dill` module is required to use the sqlite backend fully.
  from .sqlite import head_to_sql, start_sql

我尝试使用安装 pandana 和城市访问,conda install -c udst pandana urbanaccess但出现以下错误:

    The environment is inconsistent, please check the package plan carefully
    The following packages are causing the inconsistency:
    
      - conda-forge/label/cf201901/win-64::fiona==1.8.4=py37h0d92105_1001
      - defaults/noarch::geopandas==0.6.1=py_0
      - conda-forge/label/cf201901/noarch::georasters==0.5.15=py_0
      - defaults/noarch::pysal==2.1.0=py_0
      - conda-forge/label/cf201901/noarch::rasterstats==0.13.0=py_0
    failed with initial frozen solve. Retrying with flexible solve.
    Solving environment: |
Found conflicts! Looking for incompatible packages.
This can take several minutes.  Press CTRL-C to abort.
Determining conflicts:   0%|                                                                                                                                                         | 0/6 [00:00<?, ?it/s]|failed

UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:

Specifications:

  - urbanaccess -> python[version='>=2.7,<2.8.0a0|>=3.5,<3.6.0a0|>=3.6,<3.7.0a0']

Your python: esri/win-64::python==3.7.10=0

If python is on the left-most side of the chain, that's the version you've asked for.
When python appears to the right, that indicates that the thing on the left is somehow not available for the python version you are constrained to. Note that conda will not change your python version to a different minor version unless you explicitly specify that.    
The following specifications were found to be incompatible with each other:
Output in format: Requested package -> Available versions

我的计划是安装适用于 Python 3.7.10 的每个库的版本。还有其他人有建议吗?

标签: pythonmodulepython-3.7

解决方案


推荐阅读