Raw File
Faq.md
# FAQ

**It does not work. Why?**

## Latest Text-Fabric

Always use the latest version of Text-Fabric, because there is still a lot of development going on.

??? note "I have installed Text-Fabric, yet I get complaints that it cannot be found!"
    Most likely, you installed Text-Fabric into another Python than you use when you run your
    Python programs. See Python Setup below.

??? note "Why do I not get the latest version of Text-Fabric?"
    When you get errors doing `pip3 install text-fabric`, there is probably an older version around.
    You have to say

    ```sh
    pip3 install --upgrade text-fabric
    ```

    If this still does not download the most recent version of `text-fabric`, it may have been caused by caching.
    Then say:

    ```sh
    pip3 install --upgrade --no-cache-dir text-fabric
    ```

    You can check what the newest distributed version of Text-Fabric is on
    [PyPi](https://pypi.org/project/text-fabric/).

??? note "Why do I **still** not get the latest version of Text-Fabric!?!?"
    Old versions on your system might get in the way.

    Sometimes `pip3 uninstall text-fabric` fails to remove all traces of Text-Fabric.
    Here is how you can remove them manually:

    * locate the `bin` directory of the current Python, it is something like

      * (Macos regular Python) `/Library/Frameworks/Python.framework/Versions/3.7/bin`
      * (Windows Anaconda) `C:\Users\You\Anaconda3\Scripts`

      Remove the file `text-fabric` from this directory if it exists.

    * locate the `site-packages` directory of the current Python, it is something like

      * (Macos regular Python)
        `/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages`

        Remove the subdirectory `tf` from this location, plus all files with `text-fabric` in the name.

    * After this, you can make a fresh install of `text-fabric`:

      ```sh
      pip3 install text-fabric
      ```

## Python setup

If you are new to Python, it might be tricky to set up Python the right way.
If you make unlucky choices, and work with trial and error, things might get messed up.
Most of the times when `text-fabric` does not appear to work, it is because of this.
Here are some hints to recover from that.

??? note "Older versions do not get away!"
    Older versions of Python may be in the way.
    The following hygeneic measures are known to be beneficial:

    When you have upgraded Python, remove PATH statements for older versions from your system startup files.
  
    * For the Macos: look at `.bashrc`, `.bash_profile` in your home directory.
    * For Windows: on the command prompt, say `echo %path%` to see what the content of your PATH
      variable is. If you see references to older versions of python than you actually work with,
      they need to be removed. [Here is how](https://www.computerhope.com/issues/ch000549.htm)
    
    ???+ caution "Only for Python3"
        Do not remove references to Python `2.*`, but only outdated Python `3.*` versions. 


## Text-Fabric browser

??? note "I get an *Internal Server Error*!"
    When the TF browser opens with an Internal Server error, the most likely reason is that
    the TF kernel has not started up without errors.

    Look back at the terminal or command prompt where you started `text-fabric`.

    ??? caution "Error"
        If somewhere down the road you see `Error`, I offer you my apologies!

        Copy and paste that error and send it to [me](mailto:dirk.roorda@dans.knaw.nl),
        and I'll fix it as soon as I can, and I let you know on the
        [issue list](https://github.com/Dans-labs/text-fabric/issues).

    ??? caution "Out of memory"
        If TF has run out of memory, you might be able to do something about it.

        In this case, during loading TF did not have access too enough RAM memory.
        Maybe you had too many programs (or browser tabs) open at that time.

        Close as many programs as possible (even better, restart your machine) and try again.
        TF is know to work on Windows 10 machines with only 3GB RAM on board, but only in the best
        of circumstances.

        If your machine has 4GB of RAM, it should be possible to run TF, with care.






back to top