Closed garm005 closed 4 years ago
@garm005 Thanks for your suggestion.
I don't get why you propose version 3.5. APPMAR currently runs even on the last version of Python, i.e., 3.8.2.
I avoid including the Python version in the installation command in order to let Conda solve the dependencies and choose the best/latest Python version available, but now I realize that I at least should provide the major version (python=3) to ensure a correct installation using Anaconda 2.
Also, you propose using any command prompt available in the OS, but it only works if conda is in the PATH environment variable. On Windows, Anaconda/Miniconda creates a shortcut called Anaconda Prompt that opens a command prompt with conda appended to PATH. On macOS/Linux, the Conda installer asks the user to add conda to PATH.
After taking into account some of your suggestions, I propose changing instructions in the Dependencies section to the following (I'd like to read your feedback about it):
APPMAR is written in Python 3, and it requires a variety of dependencies to run. We strongly recommend using the Conda package manager to install Python 3 and APPMAR dependencies. You can obtain Conda by installing Miniconda or Anaconda.
In order to install APPMAR dependencies, open Anaconda Prompt (or any terminal with the conda command in its PATH environment variable) and execute the following command to create a new Conda environment called appmarenv
and install only Python and APPMAR dependencies on it:
conda create -y -c conda-forge -n python=3 appmarenv wxpython matplotlib scipy numpy windrose cartopy xarray gdal cfgrib
Then you can activate the recently created environment by executing:
conda activate appmarenv
The last step is to install the weibull
package. This package is not available on the Anaconda repository or conda-forge, but it can be downloaded from PyPI using pip, the Python package installer:
pip install weibull
Keep in mind that the previous installation steps are only required for the first time you run APPMAR.
@dact221: I think it is essential to be clear about how Python version was used because I feel that we need to take into account Appmar users can have basic knowledge of Python and they do not know the differences between using Python 2.7 and 3. Would it be a good idea to explain to the users how to install Appmar, if you do not use Anaconda? I know many people who prefer to use the Python with any distribution.
I can further add a note stating that it has been tested only in Python 3.8.2. Also I want you to know that we're trying to freeze the code and create an installer for less tech-savvy users.
About providing installation instructions for distributions other than Anaconda:
Actually, on Windows, users can install dependencies using pip, but it would require them to setup a toolchain and compile some binary dependencies (e.g. ecCodes). Most user don't know how to compile software.
On Linux distros, users can install dependencies using the standard package manager (apt, dnf, yum, pacman, etc.) and pip, but remember there are many Linux distros out there, and we can't provide installation instructions for all of them because of the different naming conventions and versioning they use in their repositories.
@grivillas and I assume less tech-savvy people use Windows, not Linux, and the easiest way to install Python and APPMAR dependencies on Windows is via Anaconda. That's why we focus development and documentation on Windows.
If you or some other user want to contribute installation instructions for Ubuntu (the most popular Linux distro) or macOS, we'll be happy to include them in the readme. The same goes for testing on different platforms and versions of Python or APPMAR libraries.
@garm005 I'd like you to check this new branch:
https://github.com/cemanetwork/appmar/tree/dependencies
It corresponds to pull request #6, and I hope it solves this issue.
In the last commit I changed package-list.txt to environment.yml and updated installation instructions. According to Conda documentation, conda env export --from-history
make the environment file work across different platforms. It also installs pip dependencies automatically. I made explicit the requirement for Python 3.7 in README.md and environment.yml.
Thanks Diego
CEMAN will take in consideration the comments
Best
Hi, I suggest to edit the Dependencies section with something like that:
APPMAR source code has been coding to Python 3.5. We recommend strongly to use, the open-source distribution of Python, Anaconda.
Later of installing Anaconda in your computer and before to use APPMAR, the application requires some dependencies to run, correctly. For this reason, we should install the APPMAR libraries or packages in a Conda Environment.
In a command window (Windows) or terminal (Linux, IOS), you can create the APPMAR Conda environment with the next command:
conda create –n appmarenv python=3.5 wxpython matplotlib scipy numpy windrose cartopy xarray gdal cfgrib
The next step is to activate the new environment:
conda activate appmarenv
Once we are into the APPMAR, the last step is to install the Weibull package. This package is not in the Anaconda repository, and we should use the package manager of Python packages (PIP) to install the Weibull package:
pip install weibull
The package installation and environment creation only have to do, before the first time that we run APPMAR.