Installation
Note
You need (CrySPY + Python environment + structure optimizer) in your workstation, super computer, etc.
You need (CrySPY + Python environment + structure optimizer) in your workstation, super computer, etc.
Last updated: October 17, 2026
Installing csp-cryspy with pip automatically installs required libraries such as PyXtal, pymatgen, and ASE. See Installation > CrySPY 1.3.0 or Later for details.
If you install csp-cryspy with pip, necessary libraries such as PyXtal, pymatgen, and ASE will be installed automatically. Go to Installation > CrySPY for detail.
2025 June 17, Tested and confirmed to work in the following environments (as installed via pip install csp-cryspy)
When using BO
If you install csp-cryspy with pip, necessary libraries such as PyXtal will be installed automatically. Go to Installation > CrySPY. Manual installation of COMBO is required when using Bayesian optimization.
[2023 April 22] How to instlal PyXtal (pyshtools) on arm64 MacOS is figured out. See Arm64 on MacOS (without Rosseta 2)
[2023 March 15]
On MacOS, it is difficult to install PyXtal in the arm64 environment, so it is recommended to use the x86_64 environment with Rosetta 2.
Tested with Homebrew Python 3.8.x and 3.9.x on Mac and Python 3.8.x on Linux.
Tested with Homebrew Python 3.8.x and 3.9.x on Mac and Python 3.8.x on Linux.
[2021 July 15] If you use PyXtal >= 0.2.9, update CrySPY to the version 0.10.0 or later.
[2021 March 18] There is a breaking change in pymatgen 2022.x.x. CrySPY 0.9.2 and PyXtal 0.2.2 support this change in pymatgen.
[2021 Feb. 5]
PyXtal depends on numba, but numba does not support Python 3.9.
So you should use Python 3.8.x for a while.
[2021 March 18]
Currently numba supports Python 3.9.x.
[2021 Feb. 7]
PyXtal requires SciPy, but the latest version of SciPy (v1.6.0) might include a bug for deepcopy.
You should use SciPy v1.5.4 for a while.
[2021 March 18]
This bug has been fixed in SciPy v1.6.1.
See the old document which is included CrySPY itself.
Last updated: July 9, 2026
Please note that the name is csp-cryspy on PyPI, not cryspy.
The main command, cryspy, is automatically installed in your PATH. You can check by
From version 1.4.1, several additional subcommand are also installed.
If you want to modify and use the CrySPY source code,
it is convenient to install CrySPY in editable mode
using the -e option of pip.
Since the GitHub main branch may contain development code
that differs from the official release,
download the source archive of the desired release
from the release page.
After extracting the archive, run:
If you use Bayesian optimization, PHYSBO and DScribe are required.
cal_fingerprint program and COMBO are obsolete.
When performing random structure generation with MPI parallelization, mpi4py is required.
For analysis on a local PC or in interactive mode, Jupyter is required. If you want to visualize crystal structures using nglview in interactive mode, install nglview by pip.
CrySPY 1.0.0 or later can be installed by pip.
The executable script, cryspy, is automatically installed in your PATH. You can check by
If you want to change the source code of CrySPY, you can use pip’s editable mode (-e option).
Instead of git clone, you can download the compressed file from the release page
cal_fingerprint is a program to calculate structure descriptors and is required if algo is BO. From CrySPY 1.0.0, the cal_fingerprint program is included in CrySPY utility. See Instllation/CrySPY_utility/Compile cal_fingerprint for compilation.
Put the executable file of cal_fingerprint in your PATH. Or, specify the path of the executable file in cryspy.in as follows:
In PyXtal, starting from version 0.6.3, pyshtools is no longer mandatory. Therefore, you can ignore the information written below if you are using a recent version of PyXtal.
At least one optimizer is required.
Installation of CrySPY is very simple. Just download it!
You can put the source code of CrySPY in an arbitrary directory.
For example, let us put the source code in ~/CrySPY_root/CrySPY-x.x.x (x.x.x means the version).
Use git or download the compressed file.
Download the source as a zip or tar.gz file from .
Then put the source like ~/CrySPY_root/CrySPY-x.x.x
Directory tree in ~/CrySPY_root/CrySPY-x.x.x/:
Main script is cryspy.py.
When you use find_wy, put the executable file of find_wy in ~/CrySPY_root/CrySPY-x.x.x/CrySPY/find_wy/, so that the executable file path is ~/CrySPY_root/CrySPY-x.x.x/CrySPY/find_wy/find_wy.
When you use Bayesian optimization, compile cal_fingerpirnt program which calculates structure descriptors.
Make sure that the executable file of cal_fingerprint exists in ~/CrySPY_root/CrySPY-x.x.x/CrySPY/f-fingerprint/.
CrySPY have utilized find_wy to generate a random structure for a given space group (symmetry). However, CrySPY employs PyXtal library for structure generation as default since version 0.9.0. You can skip to install find_wy in CrySPY 0.9.0 or later, but you may use find_wy. For CrySPY 0.8.x or earlier, find_wy is required to generate a random structure for a given space group.
You can skip to install find_wy in CrySPY 0.9.0 or later.
First you need compile m_tspace for find_wy. Check these sites to compile it.
Download the source code of m_tspace in an arbitrary directory. For example:
Additional two files are required to compile m_tspace.
Download the following files in ~/local/m_tspace from TSPASE:
Edit the makefile and run the make command.
If you use ifort, you had better delete -check all option and use -O2 option.
If you used gfortran, you might face the following problem:
Then change the source file of tsp98.f like this (line 9925):
Before:
After:
If you succeed in compiling, you get m_tsp.a.
Check these sites to compile find_wy:
Download the source code of find_wy in an arbitrary directory. For example:
Edit make.inc and set the path to the m_tsp.a that you just prepared.
You can delete -check all option and use -O2 option.
Then run the make command.
When you get the executable file of find_wy, run the following command for test:
If there is no problem, POS_WY_SKEL_ALL.json file is generated.
Put the executable file of find_wy in your PATH. Or, specify the path of the executable file in cryspy.in as follows:
When you use find_wy, put the executable file of find_wy in ~/CrySPY_root/CrySPY-x.x.x/CrySPY/find_wy/, so that the executable file path is ~/CrySPY_root/CrySPY-x.x.x/CrySPY/find_wy/find_wy.
Setting up Python environment in your local PC is useful to analyze CrySPY results. Utility tools (jupyter notebook and python scripts) are available for analysis and visualization. Input examples are also included in CrySPY utility.
See also cryspy_utility
You need several Python libraries such as
Go to CrySPY utility and click green Code button, then choose Download ZIP.