Open vascobnunes opened 3 years ago
@matt-bernstein did you have this at any point? This issue seems something we could prevent with some tests in tox, as you refered in #49.
I don't think so... the following tests work for me.
Installing in new env:
matthew.bernstein@lud:~$ conda create -n fels_test python=3.7
matthew.bernstein@lud:~$ conda activate fels_test
(fels_test) matthew.bernstein@lud:~$ conda config --add channels conda-forge
(fels_test) matthew.bernstein@lud:~$ conda install gdal
(fels_test) matthew.bernstein@lud:~$ pip install fels
(fels_test) matthew.bernstein@lud:~$ conda deactivate # sometimes required to set pythonpath correctly in new envs... run `type -a python` to see if you need this
matthew.bernstein@lud:~$ conda deactivate
matthew.bernstein@lud:~$ conda activate fels_test
(fels_test) matthew.bernstein@lud:~$ python
Python 3.7.10 (default, Feb 26 2021, 18:47:35)
[GCC 7.3.0] :: Anaconda, Inc. on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fels
>>> fels.safedir_to_datetime('S2A_MSIL1C_20161221T085352_N0204_R107_T33KWP_20161221T091140.SAFE')
datetime.datetime(2016, 12, 21, 8, 53, 52)
>>>
(fels_test) matthew.bernstein@lud:~$
Upgrading in new env:
matthew.bernstein@lud:~$ conda remove --name fels_test --all
matthew.bernstein@lud:~$ conda create -n fels_test python=3.7
matthew.bernstein@lud:~$ conda activate fels_test
(fels_test) matthew.bernstein@lud:~$ conda config --add channels conda-forge
(fels_test) matthew.bernstein@lud:~$ conda install gdal
(fels_test) matthew.bernstein@lud:~$ pip install fels==1.3.7
(fels_test) matthew.bernstein@lud:~$ pip install --upgrade fels
(fels_test) matthew.bernstein@lud:~$ python
Python 3.7.10 | packaged by conda-forge | (default, Feb 19 2021, 16:07:37)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import fels
>>> fels.safedir_to_datetime('S2A_MSIL1C_20161221T085352_N0204_R107_T33KWP_20161221T091140.SAFE')
datetime.datetime(2016, 12, 21, 8, 53, 52)
>>>
(fels_test) matthew.bernstein@lud:~$
You're right though, this is what tests are for. Especially when gdal is involved.
Have you tried it on windows? I only managed to install in windows with fiona 1.7.13
No, I don't have access to a windows machine. You can try adding fiona==1.7
to setup.py
's install_requires
. If that doesn't work, we may have to add geopandas as an external conda dependency like gdal is.
Here is what looks like the same issue
It also adds a windows CI step to the dashboard, which verifies that this does fix the issue.
As I previously mentioned, the underlying problem is that pip is pretty loose with its handling of binaries. Either the wheel provides them, or pip assumes you have a development environment setup that can compile the package from a source tarball. For gdal/fiona this is usually not the case. On the other hand, conda servers maintain binary packages, so you can install from their servers directly (although then you are pigeonholed into conda, which comes with it's own issues, but for win32 it's a reasonable solution).
When I upgrade fels with pip (pip install fels --upgrade), I'm getting an error with the instalation of geopandas: