| 1 |
How to install |
| 2 |
============== |
| 3 |
|
| 4 |
This page describes how to download, install and use the basic functionality of cclib. |
| 5 |
|
| 6 |
Requirements |
| 7 |
------------ |
| 8 |
|
| 9 |
Before you install cclib, you need to make sure that you have the following: |
| 10 |
* Python (at least version 3.4 is recommended, although 2.7 is still tested) |
| 11 |
* NumPy (at least version 1.5 is recommended) |
| 12 |
|
| 13 |
Python is an open-source programming language available from https://www.python.org. It is available for Windows as well as being included in most Linux distributions. In Debian/Ubuntu it is installed as follows (as root): |
| 14 |
|
| 15 |
.. code-block:: bash |
| 16 |
|
| 17 |
apt-get install python python-dev |
| 18 |
|
| 19 |
NumPy (Numerical Python) adds a fast array facility and linear algebra routines to Python. It is available from https://www.numpy.org. Windows users should use the most recent NumPy installation for the Python version they have (e.g. numpy-1.0.3.1.win32-py2.4.exe for Python 2.4). Linux users are recommended to find a binary package for their distribution rather than compiling it themselves. In Debian/Ubuntu it is installed as follows (as root): |
| 20 |
|
| 21 |
.. code-block:: bash |
| 22 |
|
| 23 |
apt-get install python-numpy |
| 24 |
|
| 25 |
To test whether Python is on the ``PATH``, open a command prompt window and type: |
| 26 |
|
| 27 |
.. code-block:: bash |
| 28 |
|
| 29 |
python |
| 30 |
|
| 31 |
If Python is not on the ``PATH`` and you use Windows, add the full path to the directory containing it to the end of the ``PATH`` variable under Control Panel/System/Advanced Settings/Environment Variables. If you use Linux and Python is not on the ``PATH``, put/edit the appropriate line in your .bashrc or similar startup file. |
| 32 |
|
| 33 |
To test that NumPy is working, try importing it at the Python prompt. You should see something similar to the following:: |
| 34 |
|
| 35 |
$ python |
| 36 |
Python 3.7.0 (default, Jul 15 2018, 10:44:58) |
| 37 |
[GCC 8.1.1 20180531] on linux |
| 38 |
Type "help", "copyright", "credits" or "license" for more information. |
| 39 |
>>> import numpy as np |
| 40 |
>>> np.__version__ |
| 41 |
'1.15.0' |
| 42 |
>>> |
| 43 |
|
| 44 |
(To exit, press CTRL+D in Linux or CTRL+Z,Enter in Windows) |
| 45 |
|
| 46 |
Installing using pip |
| 47 |
-------------------- |
| 48 |
|
| 49 |
pip_ is a command-line tool that often comes pre-packaged with Python distributions which can download packages from the `Python Package Index`_ (PyPI). To see if it's installed, on Linux or macOS try:: |
| 50 |
|
| 51 |
$ which pip |
| 52 |
|
| 53 |
and on Windows:: |
| 54 |
|
| 55 |
cmd> where.exe pip |
| 56 |
|
| 57 |
The version of `cclib uploaded to PyPI`_ can then be installed globally using:: |
| 58 |
|
| 59 |
python -m pip install cclib |
| 60 |
|
| 61 |
or to your home directory using:: |
| 62 |
|
| 63 |
python -m pip install --user cclib |
| 64 |
|
| 65 |
.. _pip: https://pip.pypa.io/en/stable/ |
| 66 |
.. _`Python Package Index`: https://pypi.org/ |
| 67 |
.. _`cclib uploaded to PyPI`: https://pypi.python.org/pypi/cclib |
| 68 |
|
| 69 |
Installing using a system package manager |
| 70 |
----------------------------------------- |
| 71 |
|
| 72 |
If you're using `Debian GNU/Linux`_, `Ubuntu`_, or a similar distribution, there are official `cclib packages`_ that you can install in any package manager (should as synaptic) or with one simple command: |
| 73 |
|
| 74 |
.. code-block:: bash |
| 75 |
|
| 76 |
aptitude install cclib |
| 77 |
|
| 78 |
There are in fact two packages, `python-cclib`_ containing the Python module, and `cclib`_ which installs just the user scripts. If you also need to also install the unittests and logfiles we distribute, you will need to install the `cclib-data`_ package from the non-free repositories (due to license issues). Because of distribution release cycles, package manager versions of cclib may be out of date compared to the PyPI version. |
| 79 |
|
| 80 |
.. _`Debian GNU/Linux`: https://www.debian.org |
| 81 |
.. _`Ubuntu`: https://www.ubuntu.com |
| 82 |
.. _`cclib packages`: https://packages.debian.org/src:cclib |
| 83 |
.. _`python-cclib`: https://packages.debian.org/stretch/python-cclib |
| 84 |
.. _`cclib`: https://packages.debian.org/stretch/cclib |
| 85 |
.. _`cclib-data`: https://packages.debian.org/stretch/cclib-data |
| 86 |
|
| 87 |
Manual download and install |
| 88 |
--------------------------- |
| 89 |
|
| 90 |
The source code of the newest release of cclib (version |release|) is distributed as: |
| 91 |
* A .zip file: https://github.com/cclib/cclib/releases/download/v1.6/cclib-1.6.2.zip |
| 92 |
* A .tar.gz file: https://github.com/cclib/cclib/releases/download/v1.6/cclib-1.6.2.tar.gz |
| 93 |
* Windows binary installers (see the `newest release page`_) |
| 94 |
|
| 95 |
On Windows, if you choose to download the .exe files instead, you can install simply by double-clicking on the file. To uninstall, use the "Add and Remove Programs" menu in the Control Panel. |
| 96 |
|
| 97 |
None of these files include the tests and logfiles used for testing. In order to download all tests, we also provide source archives on the `newest release page`_. |
| 98 |
|
| 99 |
If you are using the .zip or .tar.gz files, extract the contents of the file at an appropriate location, which we will call INSTALLDIR. Open a command prompt and change directory to INSTALLDIR. Next, run the following commands to install cclib: |
| 100 |
|
| 101 |
.. code-block:: bash |
| 102 |
|
| 103 |
python setup.py build |
| 104 |
python setup.py install # (as root) |
| 105 |
|
| 106 |
or, if pip_ is available:: |
| 107 |
|
| 108 |
python -m pip install . |
| 109 |
|
| 110 |
To test, trying importing '''cclib''' at the Python prompt. You should see something similar to the following:: |
| 111 |
|
| 112 |
$ python |
| 113 |
Python 3.7.0 (default, Jul 15 2018, 10:44:58) |
| 114 |
[GCC 8.1.1 20180531] on linux |
| 115 |
Type "help", "copyright", "credits" or "license" for more information. |
| 116 |
>>> import cclib |
| 117 |
>>> cclib.__version__ |
| 118 |
'1.6.2' |
| 119 |
>>> |
| 120 |
|
| 121 |
.. _`newest release page`: https://github.com/cclib/cclib/releases/tag/v1.3.1 |
| 122 |
|
| 123 |
What next? |
| 124 |
---------- |
| 125 |
|
| 126 |
* Read the list and specifications of the `parsed data`_ and related `data notes`_ |
| 127 |
* Test the program using the test data files included in the full source distribution |
| 128 |
* Run the unit and regression tests in the test directory (``testall.py`` and ``regression.py``) |
| 129 |
* Send any questions to the cclib-users mailing list at https://lists.sourceforge.net/lists/listinfo/cclib-users. |
| 130 |
* Write some computational chemistry algorithms using information parsed from cclib and donate the code to the project |
| 131 |
|
| 132 |
.. _`parsed data`: data.html |
| 133 |
.. _`data notes`: data_notes.html |