Closed adamjstewart closed 2 years ago
@adamjstewart it appears like you are pulling libgdal
from defaults. What is in your .condarc
file?
I'm not sure how to access the .condarc
file on GitHub Actions, but I'm just using whatever the default is. Note that the conda list
above is when using both conda-forge and defaults. If I only use conda-forge, I get the second issue with GDAL.
@adamjstewart, I'm afraid these kinds of issues are pretty much inevitable if you mix and match compiled packages like gdal
between channels. Please share the GDAL issue you're having with conda-forge on its own and we can try to help you work that one out. But issues with using defaults GDAL and conda-forge other packages are why conda-forge very strongly encourages you to run:
conda config --add channels conda-forge
conda config --set channel_priority strict
Before creating your environment. The DLLs across channels are simply not compatible with one another.
See: https://github.com/corteva/rioxarray/pull/384
I added this before the install command:
conda config --add channels conda-forge
conda config --set channel_priority strict
@snowman2, jinx!
[x] I read the conda-forge documentation and could not find the solution for my problem there.
I believe our docs jinxed you all first ;-p
@adamjstewart please take a look at those. They improved a lot lately and most of these questions are answered there and headaches avoided by following the instructions on them.
Thanks for the quick feedback everyone! When using the following settings:
- name: Install conda
uses: conda-incubator/setup-miniconda@v2
with:
python-version: ${{ matrix.python-version }}
channels: conda-forge
channel-priority: strict
- name: Install conda dependencies
run: conda install h5py 'rasterio>=1.0'
I get the following environment:
Environment (conda list
):
Again, the error message for this environment is:
import rasterio
C:\Miniconda\envs\test\lib\site-packages\rasterio\__init__.py:22: in <module>
from rasterio._base import gdal_version
E ImportError: DLL load failed: The specified procedure could not be found.
Python 3.6 is no longer supported by the scientific stack. Conda-forge will be dropping it soon but we already dropped it in some places, specially on Windows where it is harder to maintain.
Oh, good catch @ocefpaf! I hadn't noticed the python version. I wonder why the solver didn't just fail. But I guess there must be some combination of older packages that somehow works (in the sense that the solver is satisfied) but with a gdal that isn't, in fact, compatible.
@adamjstewart, I'm sure that's a frustrating situation. But if you are able to specify python >=3.7
as a constraint and try again, you might have better luck. I'm guessing you're getting python 3.6 because your Miniconda3 installation that you're starting from is pretty old and defaults to 3.6. Could that be the case?
Python 3.6 is no longer supported by the scientific stack.
Thanks @ocefpaf! I just assumed this issue had nothing to do with Python version, but if I drop 3.6 from my testing matrix the rest of the tests pass!
I'm guessing you're getting python 3.6 because your Miniconda3 installation that you're starting from is pretty old and defaults to 3.6. Could that be the case?
I was explicitly testing and supporting Python 3.6, 3.7, 3.8, and 3.9 in my project, but it sounds like I'll be dropping 3.6 support now. It's unfortunate that the scientific stack is dropping support for versions of Python before they reach EOL, but that's obviously outside of my control.
@adamjstewart, numpy recommended dropping python 3.6 support on Jun 23, 2020 (more than a year ago) in the "scientific python ecosystem" as you can read here: https://numpy.org/neps/nep-0029-deprecation_policy.html
My understanding is that it's really only practical to do a good job at support 3 python versions simultaneously. That's certainly been my experience.
Issue: I'm trying to install rasterio on Windows via GitHub Actions so that I can test my software. However, the rasterio installation doesn't seem to work:
After reading the rasterio FAQ, it seems that the issue is that
PROJ_LIB
isn't set. Could this be done in the rasterio feedstock? It seems to be done in the conda-forge version of proj, but conda is choosing to use the defaults proj instead. If I explicitly force conda to only use conda-forge, I get a different error:This one I have no idea how to solve. The below
conda list
is from the first test (mix of conda-forge and defaults) but I can give theconda list
for the second test (only conda-forge) if you want it.Environment (
conda list
):Details about
conda
and system (conda info
):@calebrob6