EDIT YOUR PROFILE HERE

Please or Register to create posts and topics.

Inkscape's Python gives you issues

Inkscape comes with Python as part of it's installation. In most cases this works well but on one of my Windows laptop, it gave me an error saying that PySerial was missing.

Adafruit has a nice and succinct description how to install this, way better than I can describe it: here it is https://learn.adafruit.com/arduino-lesson-17-email-sending-movement-detector/installing-python-and-pyserial

 

Cheers, Paul awesome.tech

The current version (2/8/2019) of the mini-gerbil plugins, specifically the laser cut plugin, throws an error in Inkscape. The plugin calls for importing the svgpathtools library which isn't included in Inkscape's python installation. The version of  Inkscape that I have installed is 32 bit, version 0.92.0.

Also, I have a question about installing the mini-gerbil plugins. The way I have installed the plugins was first install the Beta 7 plugins then install the mini-gerbil plugins over them (i.e., replacing any of the same named plugins from Beta 7). I did it this way because the mini-gerbil plugins appear to be a subset of the Beta 7 plugins. This doesn't impact the svgpathtools library issue, because the only plugin importing this library is in the mini-gerbil version of laser cut.

Ok, I got it working by:

1. Going to https://pypi.org/project/svgpathtools/#files and clicking the "download" link listed under the Project Links. Decompressing the archive and copying the svgpathtools directory to C:\Program Files (x86)\Inkscape\python\Lib

2. Going to  https://github.com/mozman/svgwrite/releases/tag/v1.2.1 and downloading the zip file. Next, decompress the archive and copy the archive's svgwrite directory to C:\Program Files (x86)\Inkscape\python\Lib.

3. Going to https://sourceforge.net/projects/pyparsing/ and downloading the exe file. Decompressing the archive and copying the file pyparsing.py in to the C:\Program Files (x86)\Inkscape\python\Lib.

You can test if everything is ok by going to C:\Program Files (x86)\Inkscape\python and running python. This will run the embedded python that is in Inkscape. At the python prompt type import svgpathtools and hitting enter. The prompt should return without errors.

dat-alex has reacted to this post.
dat-alex

Thanks for this! So far the svgpaths has not been easy to install and you still can use the previous plugin for laser cutting if this is too hard.

Cheers!

Cheers, Paul awesome.tech

Found this because I'm having the same problem. I have a new problem. Paradug's directory for this fix is  \Inkscape\python\Lib. That isn't how mine installed. For me, it's \Inkscape\Lib\Python2.7\... four choices for libs... "lib-dynload" -- "lib-tk" -- "idlelib" -- "importlib"

 

For the moment, I'm going to go with "importlib" for where to put them. However, I hope someone can give me the correct answer as to where to place the files Paradug has pointed out to us. Which I greatly appreciate.

Well, that didn't work. Maybe by posting an image that shows my directories for Inkscape that will help. Let's see...

my directories for python in inkscape

Well , Here it is my successful solution:

First of all as already has been mentioned you have to use Inkscape 0.92.0 (32bit)!

The second problem is you have to put  svgpathtools & svgwrite folders that are INSIDE paradug extracted folders and not use directly the extracted folder names.

In order to make all of the above clear I have zipped all the above directories+ pyparsing.py file for you and can put inside C:\Program Files (x86)\Inkscape\python\Lib :

download

This worked for me I hope it will be useful for you too!

Alex

NOTE: I have also include K40 Inkscape plugin in inside MGInkscape folder that you must put it in C:\Program Files (x86)\Inkscape\share\extensions folder

 

Paul has reacted to this post.
Paul

Can anyone reupload the Lip folder please? The link doesn't work.

I have this issue:

Traceback (most recent call last):
File "laser.py", line 48, in <module>
from svgpathtools import *
File "D:\Aplikace\Inkscape\python\Lib/svgpathtools/__init__.py", line 11, in <module>
from .paths2svg import disvg, wsvg
File "D:\Aplikace\Inkscape\python\Lib/svgpathtools/paths2svg.py", line 9, in <module>
from svgwrite import Drawing, text as txt
File "D:\Aplikace\Inkscape\python\Lib/svgwrite/__init__.py", line 51, in <module>
from svgwrite.drawing import Drawing
File "D:\Aplikace\Inkscape\python\Lib/svgwrite/drawing.py", line 29, in <module>
from svgwrite.container import SVG, Defs
File "D:\Aplikace\Inkscape\python\Lib/svgwrite/container.py", line 27, in <module>
from svgwrite.base import BaseElement
File "D:\Aplikace\Inkscape\python\Lib/svgwrite/base.py", line 16, in <module>
from svgwrite.params import Parameter
File "D:\Aplikace\Inkscape\python\Lib/svgwrite/params.py", line 9, in <module>
from svgwrite.validator2 import get_validator
File "D:\Aplikace\Inkscape\python\Lib/svgwrite/validator2.py", line 9, in <module>
from svgwrite.data import full11
File "D:\Aplikace\Inkscape\python\Lib/svgwrite/data/full11.py", line 11, in <module>
from svgwrite.data.typechecker import Full11TypeChecker as TypeChecker
File "D:\Aplikace\Inkscape\python\Lib/svgwrite/data/typechecker.py", line 13, in <module>
from svgwrite.data.svgparser import is_valid_transferlist, is_valid_pathdata, is_valid_animation_timing
File "D:\Aplikace\Inkscape\python\Lib/svgwrite/data/svgparser.py", line 14, in <module>
from pyparsing import *
ImportError: No module named pyparsing

Forum Registration

EDIT YOUR PROFILE HERE