brycefrank / pyfor

Tools for analyzing aerial point clouds of forest data.
MIT License
93 stars 19 forks source link

Subversive pyproj error for Windows conda environment #59

Closed brycefrank closed 4 years ago

brycefrank commented 4 years ago

Certain environment configurations in Windows have problematic pyproj installations that are unable to find local spatial reference files:

 File "_proj.pyx", line 129, in _proj.Proj.__cinit__
RuntimeError: b'no arguments in initialization list'

Oddly, this does not fail if ran from the command line directly, only from PyCharm

brycefrank commented 4 years ago

Fails in this environment:

# Name                    Version                   Build  Channel
blas                      1.0                         mkl
ca-certificates           2019.5.15                     1
certifi                   2019.6.16                py37_1
icc_rt                    2019.0.0             h0cc432a_1
intel-openmp              2019.4                      245
mkl                       2019.4                      245
mkl-service               2.3.0            py37hb782905_0
mkl_fft                   1.0.14           py37h14836fe_0
mkl_random                1.0.2            py37h343c172_0
numpy                     1.16.5           py37h19fb1c0_0
numpy-base                1.16.5           py37hc3f5095_0
openssl                   1.1.1d               he774522_0
pip                       19.2.2                   py37_0
proj4                     5.2.0                ha925a31_1
pyproj                    1.9.6            py37h6782396_0
python                    3.7.4                h5263a28_0
setuptools                41.0.1                   py37_0
six                       1.12.0                   py37_0
sqlite                    3.29.0               he774522_0
vc                        14.1                 h0510ff6_4
vs2015_runtime            14.16.27012          hf0eaf9b_0
wheel                     0.33.4                   py37_0
wincertstore              0.2                      py37_0
brycefrank commented 4 years ago

Passes in this environment, will re-run with all packages to verify:

# Name                    Version                   Build  Channel
ca-certificates           2019.5.15                     1
certifi                   2019.6.16                py37_1
openssl                   1.1.1d               he774522_0
pip                       19.2.2                   py37_0
proj4                     6.1.1                hc2d0af5_1    conda-forge
pyproj                    2.3.1            py37he1416cd_0    conda-forge
python                    3.7.4                h5263a28_0
setuptools                41.0.1                   py37_0
sqlite                    3.29.0               he774522_0
vc                        14.1                 h0510ff6_4
vs2015_runtime            14.16.27012          hf0eaf9b_0
wheel                     0.33.4                   py37_0
wincertstore              0.2                      py37_0
brycefrank commented 4 years ago

The issue is narrowed down to proj4=5.2.0. However, it is not possible to install rasterio, gdal and proj4=6.1.0 in the same envirnoment without breaking gdal.

brycefrank commented 4 years ago

This issue was actually a problem with PyCharm environment variables:

https://gis.stackexchange.com/questions/335891/pyproj-initialization-error-in-pycharm-but-not-in-cmd/335893#335893