#!/usr/bin/env python # coding: utf-8 # # Install Text-Fabric on your Python environment (generic) # ## Table of content (TOC) # * 1 - Introduction # * 2 - Install Text-Fabric in Python # * 2.1 - Install additional Text-Fabric functionality # * 3 - Remarks # * 4 - Notebook version # # 1 - Introduction # ##### [Back to TOC](#TOC) # # Before you can use Text-Fabric, you need to install it in your environment. The instructions in this section need to be executed only once. After installation, the Text-Fabric package will be available for loading into your system's memory. # # Since Text-Fabric is a Python package, it requires Python to be installed on your system. Make sure you have at least [Python 3.7.0](https://annotation.github.io/text-fabric/tf/about/install.html). If you do not have Python installed yet, you can use a package manager like [Anaconda](https://www.anaconda.com/products/distribution), which provides a Jupyter Notebook environment along with the Python setup. For more details you can refer to [this Jupyter Notebook](https://nbviewer.org/github/CenterBLC/N1904/tree/main/docs/tutorial/Install_Python.ipynb) for installation instructions. # # Another source of information on installing Text-Fabric can be found at [this Text-Fabric GitHub page](https://annotation.github.io/text-fabric/tf/about/install.html). # # 2 - Install Text-Fabric in Python # ##### [Back to TOC](#TOC) # # Installing the Text-Fabric package in a Python environment uses [pip](https://pip.pypa.io/en/stable/getting-started/), the Python package installer. To install Text-Fabric, you can use the following command in a Python shell: # # ```sh # pip install text-fabric # ``` # # If you are issuing this command in any cell inside Jupyter Notebook, you need to add an exclamation mark in front to signal that the command should be executed in the shell: # # ```python # !pip install text-fabric # ``` # # Note that in the Notebook viewer the exclamation mark is enclosed in a red box which helps users to see that this line is a shell command and not standard Python code. # ## 2.1 - Install additional Text-Fabric functionality # # The previous commands install the basic Text-Fabric package. However, Text-Fabric does also prrovide a number of options during installation. If you wish to load the [add-on features](https://centerblc.github.io/N1904/additions/#start) or use specific dataset versions *other than the latest release*, you will need to download individual files directly from the GitHub repository. This requires having Text-Fabric installed with support for this functionality. You can install this feature either during the initial installation of Text-Fabric or later as an upgrade by running the following command in your Python environment: # # ```sh # pip install text-fabric[github] # ``` # # If you are issuing this command in any cell inside Jupyter Notebook, you need to add an exclamation mark in front to signal that the command should be executed in the shell: # # ```python # !pip install text-fabric[github] # ``` # # 3 - Remarks # ##### [Back to TOC](#TOC) # # Note that if using the `pip` command gives an error, you can try using pip3 instead. This issue may arise because both Python 2 and Python 3 are installed on your system, and pip may be associated with Python 2. In such cases, the package manager for Python 3 is often installed as `pip3`. # # See also: # * [Module tf.about.install](https://annotation.github.io/text-fabric/tf/about/install.html): additional install information # # # # # 4 - Notebook version # ##### [Back to TOC](#TOC) # #
# # # # # # # # # # # # # #
AuthorTony Jurg
Version1.2
Date22 October 2024
#