Error using to_crs() -- no such file or directory - ONLY on windows
See original GitHub issueHi Colleagues. Some of my students are running into errors when they reproject using this code:
object.to_crs(another_object.crs)
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
<ipython-input-5-eb6d1da3880a> in <module>()
----> 1 sjer_aoi_wgs84 = sjer_aoi.to_crs(sjer_roads.crs)
~\Anaconda3\envs\earth-analytics-python\lib\site-packages\geopandas\geodataframe.py in to_crs(self, crs, epsg, inplace)
441 else:
442 df = self.copy()
--> 443 geom = df.geometry.to_crs(crs=crs, epsg=epsg)
444 df.geometry = geom
445 df.crs = geom.crs
~\Anaconda3\envs\earth-analytics-python\lib\site-packages\geopandas\geoseries.py in to_crs(self, crs, epsg)
302 except TypeError:
303 raise TypeError('Must set either crs or epsg for output.')
--> 304 proj_in = pyproj.Proj(self.crs, preserve_units=True)
305 proj_out = pyproj.Proj(crs, preserve_units=True)
306 project = partial(pyproj.transform, proj_in, proj_out)
~\Anaconda3\envs\earth-analytics-python\lib\site-packages\pyproj\__init__.py in __new__(self, projparams, preserve_units, **kwargs)
356 # on case-insensitive filesystems).
357 projstring = projstring.replace('EPSG','epsg')
--> 358 return _proj.Proj.__new__(self, projstring)
359
360 def __call__(self, *args, **kw):
_proj.pyx in _proj.Proj.__cinit__()
RuntimeError: b'No such file or directory'
i have not been able to recreate it on my mac but can on windows 10. I found this issue which looks related: https://github.com/jswhit/pyproj/issues/101
and this SE post
https://gis.stackexchange.com/questions/295914/error-in-coordinate-transformation-with-geopandas
to which @jorisvandenbossche suggested removing proj4 and pyproj. i tried that but it did not fix the issue. also when you remove proj4 you have to remove gdal and rasterio and cartopy… so all of a sudden my environment is gone. I also did a full fresh reinstall of the environment.
Any ideas how I can resolve this issue? And why is it so windows specific!? note - i’m on a pretty fresh windows install and do not have arcgis or anything else here. just git, python / conda and a few other basic tools for text editins and such. im using python 3.x.
Many thanks for any suggestions.
Issue Analytics
- State:
- Created 5 years ago
- Comments:20 (16 by maintainers)

Top Related StackOverflow Question
On my machines I got it working via:
This worked for me. Thanks @gboeing !