Inkscape: Perspective Hell

August 31st, 2007 by heathenx

Ever since I had formatted my computer and reloaded openSUSE 10.2, I have not been able to get the perspective effect in Inkscape v0.45-1 working. This has always been of a hit or miss for me in the past . Before I formatted I was somewhat pleased with the perspective effect. Although it threw up an error dialog it would always work after I just “okayed” the error. This time around I cannot get it to work at all. Frustrating since it’s one of my favorite features of Inkscape. I use it often. Richard and I use it to create the graphics for screencasters.heathenx.org.

A workaround for me has been using Windows XP virtually on top of openSUSE and using Inkscape in that. It’s not my preferred method but at least I’m not completely S.O.L. Now that I think of it, I cannot remember a time when the perspective effect wasn’t working for me in Windows. Uh! I hate even acknowledging that.

Honestly, I am confused by the python-numpy and python-numeric packages. Apparently, you need at least numpy so that the perspective effect will work. Not sure why I installed numeric but at this point too many packages depend on it so I cannot uninstall it. Numpy on the other hand can be installed and uninstalled all day long. Numpy is installed but me thinks openSUSE is not properly symlinking to it. The two modules that I need are just not loading or cannot be found by the perspective.py script. Richard and I spent spent a few (and probably drank a few) last night trying to troubleshoot it. Of course he is an Ubuntu Feisty user (I am too, just not on my main desktop) and I am an openSUSE user. Our packages do not match and are in different locations. It’s tough to fix when you are using different distros.

So if it helps anyone, I have recorded a short screencast (no sound) illustrating the errors that I am getting. I am using two perspective.py scripts. One is the original script that ships with Inkscape and the other is a patched script that looks like was authored by Aaron Spike. The patched script pretty much suppresses the exact errors and gives you a “friendly” error stating that numpy module is not found or loaded.

If anyone would like to help, PLEASE! I’m floating out at sea here. I would appreciate any help in the matter.

Screenshot of the original perspective.py script:

Screenshot of the patched perspective.py script:

 

5 Responses to “Inkscape: Perspective Hell”

  1. ÉCLIPSE Says:

    Hi,
    i saw your first screencast about perspective (ep35). i tried to make the same thing and it was breaking. Then i retried with this patch you wrote here and i must convert the text in path. Now it’s ok but i have a windows dialog told me that the file is a svg format… Humm so weird ! As you with Open Suse, i’m on Debian Sid so i think it’s a bug for everybody :(
    Thanks for your Screencast :)

  2. heathenx Says:

    Yup, you could be right. openSUSE just doesn’t work well enough in this regard.

    I did install Ubuntu Studio in a virtual machine and tried it out. Perspective doesn’t work out of the box without numpy. Once installed the perspective effect worked perfectly in Ubuntu. However, I did get a nag screen on the effect but once I clicked ok it followed through.

    I also tried an SVN version. Perspective still didn’t work but I noticed that I did not get the same set of errors. Perhaps the dev team is working on something there.

  3. heathenx Says:

    Update: FIXED!

    This is the error that I was getting when trying to use perspective:

    File “”, line 1, in
    File “/usr/lib/python2.5/site-packages/numpy/__init__.py”, line 43, in
    import linalg
    File “/usr/lib/python2.5/site-packages/numpy/linalg/__init__.py”, line 4, in
    from linalg import *
    File “/usr/lib/python2.5/site-packages/numpy/linalg/linalg.py”, line 25, in
    from numpy.linalg import lapack_lite
    ImportError: /usr/lib/libblas.so.3: undefined symbol: _gfortran_st_write_done

    Here’s the issue:

    “This is certainly because of a mismatch the compiler used for numpy and
    blas/lapack. I checked the rpm you are using, and it looks like whereas
    blas and lapack are compiled with gfortran, python-numpy is compiled
    with g77. I do not use opensuse myself, but started a project to provide
    binaries for numpy/scipy for this distribution: most of the packages
    like blas and lapack are broken on this platform (I really wonder if
    there was any testing of those packages by the packagers).”

    This was posted by a fellow name “David”. This guy has a repo with blas, lapack, and numpy specifically for opensuse users.

    Here is the repo:

    http://software.opensuse.org/download/home:/ashigabou/openSUSE_10.2/

    Anyway, I installed his packages and now perspective works in INkacape v0.45-1. I don’t know who “David” is because I stumbled across this fix on the ‘net but if I ever met the guy I would buy him a beer or two. I still get an error dialog when using perspective but I can ok it to carry out the command.
    :) :) :)

  4. Camilo Says:

    Oh you guy are such geeks!..I have no idea about the compilation stuff or whatever. I am a regular end user, therefore have no idea about code. I have the same problem. I don’t have the perspective feature working. It pops up some python window. What do I do, come on you guys, I have my company running on inkscape and there is no way i can buy illustrator. Gracias

  5. heathenx Says:

    Ok. Stay calm. What I need is a beer, a screwdriver, duct tape, a volt meter, and a box of twinkies. :)
    First, tell us what operating system that you are on. Then tell us which version of Inkscape that you are using. I’ll tell you right now, if you tell me that you are using a Mac then I cannot help you (since I have never used one).

Leave a Reply