Installation#

Requirement for wulfric installation are:

And several libraries:

# Package dependencies
numpy
spglib>=0.1.15

# Optional package dependencies [visual]
scipy
plotly

Wulfric can be installed with pip or from source.

Hint

Use

python --version

to check which version of python is available.

Do you have Python?#

Most likely Python is already installed on your machine (if not check these links: Python installation).

One of the ways to check if you have python installed is to execute the following command in your terminal

python

If you see something like

Python 3.10.9 (main, Dec 15 2022, 18:25:35) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>

then you have it.

In most cases python command launches python3, however if it launches python2, then you may need to use python3 instead (and pip3 instead of pip in the following).

Hint

Use exit() or press ctrl+D to close python console.

Installation with pip#

To install wulfric use the command (you may need to use pip3)

pip install wulfric

Optionally, if you want to use visualization capabilities of wulfric, you can install Plotly and SciPy manually or install them with wulfric as

pip install wulfric[visual]

Note

You may need to escape the [ and ] characters, because they are special characters in most shells. For example, in bash you can use backslash to escape them

pip install wulfric\[visual\]

Or enclose full name in quotes

pip install "wulfric[visual]"

Hint

If you are using jupyter lab or notebook, then wulfric can be installed with

%pip install wulfric

within it.

Installation from source#

  • Clone the project to your local computer

    git clone git@github.com:adrybakov/wulfric.git
    
  • Change the directory

    cd wulfric
    
  • Install the requirements

    pip install -r requirements.txt
    

    You'll see that all dependencies (both mandatory and optional) are installed. If you prefer to install only mandatory dependencies, then you can do it manually.

  • To install wulfric, run (you may need to use pip3)

    pip install .
    

Update#

If you want to update the package to the latest available version (0.6.4), then use the command (you may need to use pip3)

pip install wulfric --upgrade