Installation

Requirements

cosymlib contains libraries written in Fortran that require a compiler to build them. Before installing cosymlib make sure you have a working Fortran compiler installed in your system. For UNIX based systems you can install GNU Fortran Compiler from package repositories by opening a terminal and typing the following commands:

  • Linux

    On YUM-based systems (Fedora/RedHat/CentOS)

    sudo yum install yum-utils
    

    On APT-based systems (Debian/Ubuntu)

    sudo apt-get build-dep
    
  • Mac

  1. Install command-line tools:

    xcode-select --install
    
  2. Get Homebrew following the instructions at https://brew.sh, and install GCC formula by:

    brew install gcc
    

Install

cosymlib is available in both GitHub and PyPI repositories (https://pypi.org/project/cosymlib/). Installation via PyPI is simpler and it is recommended for most users.

from PyPI

This installation requires pip ( https://pip.pypa.io/en/stable/installing/) to be installed in your system. Once pip is properly installed you can install cosymlib by typing:

pip install cosymlib --user

if your system contains both python2 and python3 installed and you intend to install cosymlib for python3 use:

pip3 install cosymlib --user

from GitHub

Alternatively you can download the latest version of cosymlib from github using git (https://git-scm.com) and install it manually through setup.py file using setuptools (https://setuptools.readthedocs.io/).

First, download the code using git in your computer by typing:

git clone https://github.com/GrupEstructuraElectronicaSimetria/cosymlib.git

This creates a copy of the repository in your computer. You can keep it updated by synchronizing it with GitHub repository by using the command:

git pull

Once this is done, move to the repository root directory (where setup.py is found) and type the following command to install cosymlib :

python setup.py install --user

Note

requirements.txt file located at the repository root directory contains a list of all dependency python modules needed for cosymlib to run. If any of them are missing in your system you will need to install them before running cosymlib.

In both cases (PyPI & Github installations) the code will be installed as a python module. To check that it is properly installed you can run the python interpreter and execute:

import cosymlib

if the execution do not show any errors cosymlib has been installed successfully.