Difference between revisions of "Extension requirements"

From Inkscape Wiki
Jump to navigation Jump to search
m (moved GettingEffectsWorking to Effect requirements: better name + kill wikiwords)
(11 intermediate revisions by 3 users not shown)
Line 1: Line 1:
== Setting Up Effects in Inkscape ==
== Setting Up Effects in Inkscape ==
<i>For effects to work you need to be using inkscape .42 or later.</i><br>
<i>For info about what effects can do, screenshots, and how to make your own go to [http://www.ekips.org/comp/inkscape/ Aarons Site]</i><br>
<i>See also [[GettingExtensionsWorking]].</i><br>


For effects to work you need to be using inkscape .42 or later.
For info about what effects can do, screenshots, and how to make your own go to [http://www.ekips.org/comp/inkscape/ Aarons Site]
If you are interested in opening special file formats through extensions, see  [[GettingExtensionsWorking]].


=== Unhide the Effects menu ===
=== Unhide the Effects menu ===
(Only necessary in some versions of Inkscape. Between .41 and .45)
On the "Misc" tab of the "Inkscape Preferences" dialog check the box labeled "Enable script effects" (0.41+CVS onwards only)


Close and reopen Inkscape
This is only necessary in verions .41+CVS to .45.


On the "Misc" tab of the "Inkscape Preferences" dialog check the box labeled "Enable script effects". Close and reopen Inkscape


== Python Effects ==
== Python Effects ==
Line 18: Line 18:


=== on Microsoft Windows ===
=== on Microsoft Windows ===
[[GettingEffectsWorking/Windows]] Tutorial on Getting Effects to work on Windows
<b>Important note: From version .44 onwards, Inkscape now includes python in the download, and has effects <i>enabled</i> by default. Therefore these steps are outdated and no longer needed.</b>
 
# Download [http://www.python.org/download/ Python]
# Install  python and remember the directory you set it to install to. (e.g. C:\Python24 )
# Set your path variable in Windows. For Windows 2000 or XP read [http://support.microsoft.com/default.aspx?scid=kb;en-us;310519&sd=tech Microsofts instructions] or do
## Right Click My Computer
## Properties
## Advanced Tab
## Environment Variables
## In the system variables section select the one named PATH and hit edit.
## Find the end of all the values in there and add ";*path to python*" where *path to python* is the directory you told python to install to (ie c:\program files\python24)
## hit Ok, Ok, Apply
For more general instructions (including instructions for Windows 95,98,ME,NT,2000 and XP) look at the [http://www.chem.gla.ac.uk/%7Elouis/software/faq/q1.html University of Glasgow's] instructions, just remember that you want to set the PATH varable to the python directory. If there is already a path variable, don't delete it, but just add a semicolon and then the full path to the python directory at the end (e.g. PATH = C:\somthing else ; C:\python_directory)
# Reboot
# Download and Install [http://sourceforge.net/project/showfiles.php?group_id=6473 PyXML] for whatever version Python you chose to install
 
To get the effects menu showing up:
# Load Inscape
# Go to File > Inkscape Preferences (Shift+Ctrl+P)
# Select the "Misc" tab and tick "Enable script effects..."
# Restart Inkscape
 
If that didn't work, you may like to try to edit the preferences manually:
# Go to your preferences.xml file (Documents and Settings/USERNAME/Application Data/Inkscape/preferences.xml)
# Search for "id="extensions".
# If you find it: Add the following line above that "show-effects-menu="1".
# If you can't find it just add
    <group
    show-effects-menu="1"
    id="extensions" />
Save the file, start up inkscape and use those sweet effects


=== on Mac OS X ===
=== on Mac OS X ===


Mac OS X ships with python but without some packages that Inkscape uses: [http://pyxml.sourceforge.net/ pyXML] (which will be suppressed in version 0.46), [http://numpy.scipy.org/ numpy] and [http://codespeak.net/lxml/ lxml]
Starting with version 0.46, Inkscape contains the python packages needed for the extension system. All python extensions should work out of the box. However in case you still have trouble you can install them in their regular location.


==== Binary packages ====
==== Binary packages ====
On OS X Panther or Tiger, you can install a binary version compiled by us with Python 2.3, downloadable with the development builds of Inkscape:
 
:http://inkscape.modevia.com/macosx-snap/?M=D
# Download and open http://inkscape.modevia.com/macosx-snap/Python-packages.dmg
You need to copy the folders for numpy (numpy) and lxml (*lxml*.egg or lxml) to System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages (there is a link in the dmg on which the folders can be dropped).
# Browse the disk image to find the packages corresponding to your architecture and Python version
#* Your architecture is ppc if you have a G4-G5 based Mac, i386 if you have an Intel Mac
#* By default Panther and Tiger have Python 2.3 and Leopard has Python 2.5. If you have installed a newer version of Python we also provide packages for 2.4
# Copy all the files and folder from the appropriate location to your Python site-packages directory. By default the site-packages directory is /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages on Panther and Tiger, /Library/Python/2.5/site-packages on Leopard. Otherwise it is somewhere in your custom install of python (/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/ for an install of Python 2.4 via MacPorts for example)


==== Compiling from source ====
==== Compiling from source ====
If you prefer, you can install them from source, it is really easy.
If you prefer, you can install them from source, it is really easy.


# download the source code from [http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103 sourceforge numpy repository] or [http://codespeak.net/lxml/index.html#download lxml download section]
# download the source code for [http://sourceforge.net/project/showfiles.php?group_id=1369&package_id=175103 sourceforge numpy repository] and/or [http://codespeak.net/lxml/index.html#download lxml download section]
# unpack the <code>.tar.gz</code> file <pre>tar -xzf numpy***.tar.gz lxml***.tar.gz</pre>
# unpack the <code>.tar.gz</code> file <pre>tar -xzf numpy***.tar.gz lxml***.tar.gz</pre>
# for each one <code>cd<code> into the newly created directory
# for each one <code>cd</code> into the newly created directory
# build C extensions and install (the install is system wide so you need administrator priviledges)<pre>sudo python setup.py install</pre>and type your password.
# build C extensions and install (the install is system wide so you need administrator privileges)<pre>sudo python setup.py install</pre>and type your password.


The packages are installed in the <code>site-packages</code> directory of your Python install. This is <code>/Library/Python/2.*/site-packages/<code> for the stock install of Python on Mac OS X.
The packages are installed in the site-packages directory of your Python install. This is /Library/Python/2.*/site-packages for the stock install of Python on Mac OS X.


== Perl Effects ==
== Perl Effects ==

Revision as of 02:04, 20 June 2009

Setting Up Effects in Inkscape

For effects to work you need to be using inkscape .42 or later.

For info about what effects can do, screenshots, and how to make your own go to Aarons Site

If you are interested in opening special file formats through extensions, see GettingExtensionsWorking.

Unhide the Effects menu

This is only necessary in verions .41+CVS to .45.

On the "Misc" tab of the "Inkscape Preferences" dialog check the box labeled "Enable script effects". Close and reopen Inkscape

Python Effects

on Debian GNU / Linux

   apt-get install python python-xml

on Microsoft Windows

Important note: From version .44 onwards, Inkscape now includes python in the download, and has effects enabled by default. Therefore these steps are outdated and no longer needed.

  1. Download Python
  2. Install python and remember the directory you set it to install to. (e.g. C:\Python24 )
  3. Set your path variable in Windows. For Windows 2000 or XP read Microsofts instructions or do
    1. Right Click My Computer
    2. Properties
    3. Advanced Tab
    4. Environment Variables
    5. In the system variables section select the one named PATH and hit edit.
    6. Find the end of all the values in there and add ";*path to python*" where *path to python* is the directory you told python to install to (ie c:\program files\python24)
    7. hit Ok, Ok, Apply

For more general instructions (including instructions for Windows 95,98,ME,NT,2000 and XP) look at the University of Glasgow's instructions, just remember that you want to set the PATH varable to the python directory. If there is already a path variable, don't delete it, but just add a semicolon and then the full path to the python directory at the end (e.g. PATH = C:\somthing else ; C:\python_directory)

  1. Reboot
  2. Download and Install PyXML for whatever version Python you chose to install

To get the effects menu showing up:

  1. Load Inscape
  2. Go to File > Inkscape Preferences (Shift+Ctrl+P)
  3. Select the "Misc" tab and tick "Enable script effects..."
  4. Restart Inkscape

If that didn't work, you may like to try to edit the preferences manually:

  1. Go to your preferences.xml file (Documents and Settings/USERNAME/Application Data/Inkscape/preferences.xml)
  2. Search for "id="extensions".
  3. If you find it: Add the following line above that "show-effects-menu="1".
  4. If you can't find it just add
    <group
    show-effects-menu="1"
    id="extensions" />

Save the file, start up inkscape and use those sweet effects

on Mac OS X

Starting with version 0.46, Inkscape contains the python packages needed for the extension system. All python extensions should work out of the box. However in case you still have trouble you can install them in their regular location.

Binary packages

  1. Download and open http://inkscape.modevia.com/macosx-snap/Python-packages.dmg
  2. Browse the disk image to find the packages corresponding to your architecture and Python version
    • Your architecture is ppc if you have a G4-G5 based Mac, i386 if you have an Intel Mac
    • By default Panther and Tiger have Python 2.3 and Leopard has Python 2.5. If you have installed a newer version of Python we also provide packages for 2.4
  3. Copy all the files and folder from the appropriate location to your Python site-packages directory. By default the site-packages directory is /System/Library/Frameworks/Python.framework/Versions/2.3/lib/python2.3/site-packages on Panther and Tiger, /Library/Python/2.5/site-packages on Leopard. Otherwise it is somewhere in your custom install of python (/opt/local/Library/Frameworks/Python.framework/Versions/2.4/lib/python2.4/site-packages/ for an install of Python 2.4 via MacPorts for example)

Compiling from source

If you prefer, you can install them from source, it is really easy.

  1. download the source code for sourceforge numpy repository and/or lxml download section
  2. unpack the .tar.gz file
    tar -xzf numpy***.tar.gz lxml***.tar.gz
  3. for each one cd into the newly created directory
  4. build C extensions and install (the install is system wide so you need administrator privileges)
    sudo python setup.py install
    and type your password.

The packages are installed in the site-packages directory of your Python install. This is /Library/Python/2.*/site-packages for the stock install of Python on Mac OS X.

Perl Effects

on Debian GNU / Linux

   apt-get install perl libxml-xql-perl

on Gentoo GNU / Linux

   emerge -a XML-XQL

on Microsoft Windows

   install ActivePerl
   install XML::XQL::DOM (perhaps like this?)
       1: install prereqs with ppm:
	    install xml-dom
	    install parse-yapp
	    install datemanip
       2: download xml-xql from:
	    http://www.cpan.org/authors/id/T/TJ/TJMATHER/XML-XQL-0.68.tar.gz
       3: open command prompt and locate perl"s lib directory with:
	    perl -e "print qq(@INC)"    (mine was C:/Perl/site/lib)
       4: unpack xml-xql archive
       5: copy contents of XML-XQL-*\lib\XML into C:\Perl\site\lib\XML
       6: copy XML-XQL-*\XQLParser\Parser.pm to C:\Perl\site\lib\XML\XQL

Plugin Effects

I have absolutely no idea. Please record your success here. :)

What if it doesn't work?

Run Inkscape from the console

Use the error messges printed to the console to diagnose the problem (very often missing dependencies)

On Windows you will have to redirect output to a text file like this: "inkscape > output.txt"