CosmiQ / solaris

CosmiQ Works Geospatial Machine Learning Analysis Toolkit
https://solaris.readthedocs.io
Apache License 2.0
413 stars 112 forks source link

[BUG]: (Error while installing solaris - pip install . - on Windows) #352

Closed Servando1990 closed 4 years ago

Servando1990 commented 4 years ago

Thank you for helping us improve solaris!

Summary of the bug

Following README's instruction to install solaris I've found the same error several times. I'm using Windows. Because I didn't have problems on Mac

Steps to reproduce the bug

cd solaris conda env create -n solaris -f environment.yml conda activate solaris pip install .

Paste output here


    ERROR: Command errored out with exit status 1:
     command: 'C:\Users\sdtorres\Anaconda3\envs\solaris\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\\Users\\sdtorres\\AppData\\Local\\Temp\\pip-req-build-maxx2990\\setup.py'"'"'; __file__='"'"'C:\\Users\\sdtorres\\AppData\\Local\\Temp\\pip-req-build-maxx2990\\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base 'C:\Users\sdtorres\AppData\Local\Temp\pip-pip-egg-info-k_88fa02'
         cwd: C:\Users\sdtorres\AppData\Local\Temp\pip-req-build-maxx2990\
    Complete output (1 lines):
    GDAL must be installed to use `solaris`. See the documentation for more info. We recommend installing GDAL within a conda environment first, then installing solaris there.
    ----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
roshanr11 commented 4 years ago

Hi @Servando1990, thanks for reporting this issue! The rtree and gdal packages can be problematic to install without Anaconda. As noted in the current README, try the following:

cd solaris conda env create -n solaris -f environment.yml conda activate solaris conda install -c conda-forge rtree gdal=2.4.1 pip install solaris

Hope this helps!

Adrianahuante commented 4 years ago

Hi @roshanr11, I'm facing the same problem and unfortunately running the extra line conda install -c conda-forge rtree gdal=2.4.1 doesn't solve the problem. Also, if i try to install solaris via pip and not from the conda environment I get the following:

C:\Users\52442>pip install solaris
Collecting solaris
  Using cached solaris-0.3.0-py3-none-any.whl (17.8 MB)
Requirement already satisfied: opencv-python>=4.1 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (4.3.0.36)
Collecting pyyaml==5.2
  Using cached PyYAML-5.2-cp37-cp37m-win_amd64.whl (215 kB)
Collecting requests==2.22.0
  Using cached requests-2.22.0-py2.py3-none-any.whl (57 kB)
Requirement already satisfied: matplotlib>=3.1.2 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (3.2.2)
Requirement already satisfied: torchvision>=0.5.0 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (0.6.1)
Requirement already satisfied: fiona>=1.7.13 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (1.8.13)
Collecting tensorflow==1.13.1
  Using cached tensorflow-1.13.1-cp37-cp37m-win_amd64.whl (63.1 MB)
Requirement already satisfied: torch>=1.3.1 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (1.5.1)
Requirement already satisfied: tqdm>=4.40.0 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (4.47.0)
Requirement already satisfied: scipy>=1.3.2 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (1.5.0)
Requirement already satisfied: rtree>=0.9.3 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (0.9.4)
Requirement already satisfied: scikit-image>=0.16.2 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (0.16.2)
Requirement already satisfied: networkx>=2.4 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (2.4)
Requirement already satisfied: rasterio>=1.0.23 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (1.1.5)
Requirement already satisfied: urllib3>=1.25.7 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (1.25.9)
Requirement already satisfied: pip>=19.0.3 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (20.1.1)
Requirement already satisfied: pandas>=0.25.3 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (1.0.5)
Collecting pyproj>=2.1
  Using cached pyproj-2.6.1.post1-cp37-cp37m-win_amd64.whl (17.2 MB)
Requirement already satisfied: affine>=2.3.0 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (2.3.0)
Collecting albumentations==0.4.3
  Using cached albumentations-0.4.3.tar.gz (3.2 MB)
Requirement already satisfied: numpy>=1.17.3 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (1.18.5)
Requirement already satisfied: gdal>=3.0.2geopandas>=0.7.0 in c:\users\52442\anaconda3\lib\site-packages (from solaris) (3.1.2)
ERROR: Could not find a version that satisfies the requirement shapely>=1.7.1dev (from solaris) (from versions: 1.0a7, 1.0b1, 1.0b2, 1.0b3, 1.0b4, 1.0rc1, 1.0rc2, 1.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.11, 1.0.12, 1.0.13, 1.0.14, 1.0.15, 1.2b1, 1.2b2, 1.2b3, 1.2b4, 1.2b5, 1.2b6, 1.2b7, 1.2rc1, 1.2rc2, 1.2, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 1.2.7, 1.2.8, 1.2.9, 1.2.10, 1.2.12, 1.2.13, 1.2.14, 1.2.15, 1.2.16, 1.2.17, 1.2.18, 1.2.19, 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.4.0, 1.4.1, 1.4.2, 1.4.3, 1.4.4, 1.5.0, 1.5.1, 1.5.2, 1.5.3, 1.5.4, 1.5.5, 1.5.6, 1.5.7, 1.5.8, 1.5.9, 1.5.10, 1.5.11, 1.5.12, 1.5.13, 1.5.14, 1.5.15, 1.5.16, 1.5.17, 1.6a1, 1.6a2, 1.6b1, 1.6b2, 1.6b3, 1.6b4, 1.6b5, 1.6.0, 1.6.1, 1.6.2, 1.6.2.post1, 1.6.3, 1.6.4, 1.6.4.post1, 1.6.4.post2, 1.7a1, 1.7a2, 1.7a3, 1.7b1, 1.7.0)
ERROR: No matching distribution found for shapely>=1.7.1dev (from solaris)

which is weird because the latest version of shapely is 1.7.0 and modifying the setup.py doesn't help either. Also, the environment is installing shapely 1.8.0dev

shapely                   1.8.dev0                 pypi_0    pypi

@Servando1990, could you solve the problem? @nrweir this is similar to #344 but the problem isn't solved yet

I'm working on windows 10 and my version of python is 3.7.7

Servando1990 commented 4 years ago

Hi!

I solved the problem in With Ubuntu 2.0

thanks

pingjuh commented 3 years ago

hi @Servando1990, could u install it on windows? i face the same error " GDAL must be installed to use solaris", even though anaconda navigator shows that i have gdal 3.0.3 installed in my solaris environment.