Getting started
Requirements
The EasyCrystallography library is developed in Python, so Python must be installed on your system. The library is compatible with Python versions 3.9 through 3.12.
Environment setup optional
We recommend using a virtual environment – an isolated Python runtime where any packages you install or update are contained within that environment. If you encounter issues, you can simply delete and recreate the environment. Setting it up is straightforward:
Create a new virtual environment with:
python3 -m venv venv
Activate the environment with:
. venv/bin/activate
. venv/Scripts/activate
. venv/bin/activate
Your terminal should now print (venv)
before the prompt, which is how you know
that you are inside the virtual environment that you just created.
Exit the environment with:
deactivate
Installation
From PyPI recommended
EasyCrystallography is published on the Python Package Index (PyPI) repository and can be installed with the package installer for Python (pip), ideally by using a virtual environment. To do so, use the following command:
pip install 'easycrystallography'
To install a specific version of EasyDiffraction, e.g. 0.6.0, use:
pip install 'easycrystallography==0.6.0'
Upgrading to the latest version can be done with:
pip install --upgrade --force-reinstall easycrystallography
To show the currently installed version, use:
pip show easycrystallography
From GitHub
Installing an unreleased version is not recommended and should only be done for testing purposes.
Here is an example of how to install EasyCrystallography directly from our
GitHub repository, e.g., from the develop
branch:
pip install git+https://github.com/EasyScience/EasyCrystallography@develop