Manual Setup for Linux and macOS

A manual setup will allow you to edit the code while running the extension.

How to Install Ink/Stich Manually

1. Clone the extension source

We recommend to use pyenv with python 3.8.

git clone https://github.com/inkstitch/inkstitch
git clone https://github.com/inkstitch/pyembroidery

2. Python Dependencies

A few python more modules are needed. In some cases this extension uses features that aren’t available in the versions of the modules pre-packaged in distributions, so we recommend installing them directly with pip.

Since we already installed pyembroidery just temporarely comment it out before you run these commands.

pip install -r inkstitch/requirements.txt

3. Prepare INX files and electron

Now we need to create the files for the Inkscape menu and setup the electron extensions

cd inkstitch
make manual

When you later add or change a template file for Ink/Stitch extensions, simply run

make inx
cd ~/.config/inkscape/extensions
ln -s /path/to/inkstitch

5. Run Inkscape.

Changes to the Python code take effect the next time the extension is run. Changes to the extension description files (*.inx) take effect the next time Inkscape is restarted.

Troubleshoot

ImportError: No module named shapely

If Ink/Stitch returns ImportError: No module named shapely, then it is likely the version of Python used by Inkscape and the version you installed the Python dependencies for above are different.

  • Open the file preferences.xml.
    The location can be found under Edit > Preferences > System > User preferences
  • Close Inkscape before editing the file.
    It will otherwise be overwritten when Inkscape closes.
  • Search for the term <group id="extensions" /> and update to the correct Python interpreter.

    Example: Use <group id="extensions" python-interpreter="/usr/local/bin/python3" /> where /usr/local/bin/python3 is the value returned by which python3.