简体   繁体   English

在 PyProj 的全新 Conda 安装中:pyproj 无法设置数据库路径。 _pyproj_global_context_initialize()

[英]On fresh Conda installation of PyProj: pyproj unable to set database path. _pyproj_global_context_initialize()

I want to use PyProj .我想使用PyProj I follow the installation instructions given in the documentation我按照文档中给出安装说明进行操作

conda config --prepend channels conda-forge
conda config --set channel_priority strict
conda install pyproj

When I run当我跑

from pyproj import CRS

I am getting我正进入(状态

C:\\Users...\\Miniconda3\\envs\\geopandas\\lib\\site-packages\\pyproj_ init _.py:89: UserWarning: pyproj unable to set database path. C:\\Users...\\Miniconda3\\envs\\geopandas\\lib\\site-packages\\pyproj_ init _.py:89: UserWarning: pyproj 无法设置数据库路径。 _pyproj_global_context_initialize() _pyproj_global_context_initialize()

Some information on Python and my system关于 Python 和我的系统的一些信息

Python version -> 3.9.7 | Python 版本 -> 3.9.7 | packaged by conda-forge |由 conda-forge 打包 | (default, Sep 29 2021, 19:15:42) [MSC v.1916 64 bit (AMD64)] (默认,2021 年 9 月 29 日,19:15:42)[MSC v.1916 64 位 (AMD64)]

Operation System Information -> Windows-10-10.0.19042-SP0操作系统信息 -> Windows-10-10.0.19042-SP0

The way I solved it now (make sure you are in you environment with conda activate YOUR_ENV :我现在解决它的方式(确保您在使用conda activate YOUR_ENV环境中:

conda remove --force pyproj

This removes the library from the conda environment and then这将从conda environment删除库,然后

pip install pyproj

Now I do not get the error upon calling from pyproj import CRS .现在我在调用from pyproj import CRS时没有收到错误from pyproj import CRS

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM