Installation

Create a Virtual Environment

It is common practice to set up and work within virtual environments, as it helps avoid potential dependency conflicts, and represents good practice. It is also strongly recommended to do that here with GrainPy. GrainPy was built and continues to be developed using Conda and Anaconda environment, although it is not required and we present several command line procedures below for creating and then activating your new virtual environment.

Conda

# create
conda create -n CoolNewGrainPyVirtualEnvironment

# activate
conda activate CoolNewGrainPyVirtualEnvironment

Mac OSX Terminal

# create
python3 -m venv CoolNewGrainPyVirtualEnvironment

# activate
source CoolNewGrainPyVirtualEnvironment/bin/activate

Windows Command Prompt

# create
py -m venv CoolNewGrainPyVirtualEnvironment

# activate
.\CoolNewGrainPyVirtualEnvironment\Scripts\activate

Install the GrainPy Package

Once your virtual environment is created and activated, installing GrainPy is similar across each of the three platforms discussed above. Each released version of GrainPy is also indexed on PyPi, and it is recommended to install this package using pip.

python3 -m pip install grainpy
# Note for Windows: "python3" should be substituted with "py"

Congratulations! the most current stable release of GrainPy is now installed and ready to use!

Developmental Version

In some cases, the user may want to install the current working version of GrainPy, which can be done directly from Github.

python3 -m pip install git+https://github.com/masseygeo/GrainPy@main
# Note for Windows: "python3" should be substituted with "py"

Congratulations! the most current, developmental version of GrainPy is now installed and ready to use! If you experience bugs, please create a new issue on Github with the appropriate label