GeoscienceAustralia / tcrm

A statistical-parametric model for assessing wind hazard from tropical cyclones
http://geoscienceaustralia.github.io/tcrm
Other
80 stars 52 forks source link

TCRM Installation - creation of tcrm environment #137

Closed har4507 closed 1 year ago

har4507 commented 1 year ago

Dear TCRM developers, I have tried to install TCRM on Windows 8.1 using Anaconda3 and python 3.7 as described below.

  1. downloaded and copied the zip file and extracted its contents to c:/tcrm
  2. added the relevant paths to PYTHONPATH (c:/tcrm; c:/tcrm/utilities)
  3. installed all required python packages included in the tcrmenv.yml with conda, conda install -c anaconda packagename conda install -c conda-forge packagename
  4. tried to create the tcrm environment with the command c:\tcrm> conda env create -f tcrmenv.yml However, its creation had not been completed although the command was running for more than 18 hours.

I also tried to create the tcrm environment after updating all packages, again with no success. The package versions are shown below

pip | 20.2.4 numpy | 1.17.0 scipy | 1.5.2 matplotlib | 3.3.2 basemap | 1.2.0 shapely | 1.6.4 nose | 1.3.7 netcdf4 | 1.5.4 cftime | 1.2.1 coverage | 6.3.2 coveralls | 3.3.1 pycurl | 7.43.0.6 pyproj | 1.9.6 seaborn | 0.11.0 simplejson | 3.17.6 sqlite | 3.33.0 statsmodels | 0.12.0 libgdal | 2.3.3 gdal | 2.3.3 configparser | 5.0.2 cartopy | 0.17.0 affine | 2.3.0 tqdm | 4.50.2 xarray | 0.15.1 pthreadstubs | 0.4 imageio | 2.9.0 mpi4py | 3.1.3 boto3 | 1.26.16 botocore | 1.26.19

I would very much appreciate your guidance and any advice in order to complete the model installation. Thank you for your time and your kind assistance

wcarthur commented 1 year ago

If you have Anaconda installed, you should only need to run the environment creation command

conda env create -f tcrmenv.yml

If you have installed packages using conda install -c anaconda packagename and then attempted to create the environment, there are likely to be problems resolving conflicts between the different package repositories. We use almost exclusively the conda-forge package repository.

You may need to re-install Anaconda to remove any signs of the conflicting packages, as the above command will still attempt to use existing modules from the base environment if they have been previously installed.

har4507 commented 1 year ago

Thank you for your prompt respose and your guidance. Some of the packages were not present in the Anaconda and I installed them.I shoudh't do that. Many thanks again.

Στις Τρίτη 29 Νοεμβρίου 2022 - 06:15:36 π.μ. EET, ο χρήστης Craig Arthur ***@***.***> έγραψε:  

If you have Anaconda installed, you should only need to run the environment creation command

conda env create -f tcrmenv.yml

If you have installed packages using conda install -c anaconda packagename and then attempted to create the environment, there are likely to be problems resolving conflicts between the different package repositories. We use almost exclusively the conda-forge package repository.

You may need to re-install Anaconda to remove any signs of the conflicting packages, as the above command will still attempt to use existing modules from the base environment if they have been previously installed.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.Message ID: @.***>

har4507 commented 1 year ago

Dear TCRM developers, Can you suggest an Anaconda version that could be "safely" used to install TCRM?

I reinstalled Anacond 3 v. 2021-05 (python 3.8.8) and tried to create the tcrm environment in c:\tcrm with the command

conda env create -f  tcrmenv.yml 

but it didh't work. I then installed all the missing dependecies in the base environment included in the tcrmenv.yml file from the conda-forge package depository with

conda install -c conda-forge packagename

Some packages where installed with the flexible solver. However, I could not install the gdal package.

Thus, I re-installed Anaconad3 using v. 2021-11 (python 3.9.7) and followed the above procedure without luck again. This time I installed gdal first but I could't install basemap. I managed to installed basemap to a different environment, but again I could not create the tcrm environment.

Am I doing something wrong in the above installation procedure?

Thanks for your time and comments.

marielduran25 commented 1 year ago

Hello,

I am experiencing similar issue. Did you manage to resolve this? The last error that I have is related to gdal. It's looking for "_gdal" even though gdal is already installed. I appreciate it if you can give me tips regarding this problem.

Thank you.

wcarthur commented 1 year ago

I have updated the environment file tcrmenv.yml in a new release (see #140 for details), which changes the order of the libraries which resolves issues with gdal installation.

We have also started using mamba (https://mamba.readthedocs.io/en/latest/installation.html) for our builds in the GitHub Actions workflow, which dramatically speeds up the build time of the environment. mamba should be installed in the base conda environment only, then use mamba commands with the tcrmenv.yml file to build the environment. We will update the documentation on TCRM installation to reflect this shortly

marielduran25 commented 1 year ago

I have updated the environment file tcrmenv.yml in a new release (see #140 for details), which changes the order of the libraries which resolves issues with gdal installation.

We have also started using mamba (https://mamba.readthedocs.io/en/latest/installation.html) for our builds in the GitHub Actions workflow, which dramatically speeds up the build time of the environment. mamba should be installed in the base conda environment only, then use mamba commands with the tcrmenv.yml file to build the environment. We will update the documentation on TCRM installation to reflect this shortly

The use of mamba did the trick. Thank you!