简体   繁体   中英

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

I want to use 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. _pyproj_global_context_initialize()

Some information on Python and my system

Python version -> 3.9.7 | packaged by conda-forge | (default, Sep 29 2021, 19:15:42) [MSC v.1916 64 bit (AMD64)]

Operation System Information -> 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 remove --force pyproj

This removes the library from the conda environment and then

pip install pyproj

Now I do not get the error upon calling from pyproj import CRS .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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