Extensions fail, concurrent Python installations

Bug #896659 reported by Jim.Nickerson
34
This bug affects 4 people
Affects Status Importance Assigned to Milestone
Inkscape
Invalid
Medium
Unassigned

Bug Description

Inkscape 0.48.2 r9819
Vista 64
Windows Vista Ultimate, Service Pack 2
Dell I-7, Quad core
All the extensions I tried produce the message:

The fantastic lxml wrapper for libxml2 is required by inkex.py and therefore this extension. Please download and install the latest version from http://cheeseshop.python.org/pypi/lxml/, or install it through your package manager by a command like: sudo apt-get install python-lxml

Revision history for this message
Alvin Penner (apenner) wrote :

On Windows 7 (32 bit) there is a directory called lxml at the location:
C:\Program Files\Inkscape\python\Lib\site-packages\lxml
This is installed automatically by Inkscape. Could you report what the directory path to lxml is on your machine, it will be different because it is a 64 bit machine. (probably under Program Files x86?)

Also, one can confirm the presence of the lxml package in DOS using Python:
The commands are as follows:

C:\Program Files\Inkscape\python>python
Python 2.6.6 (r266:84297, Aug 24 2010, 18:46:32) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
>>> exit()

The command 'python' just loads python and the command 'import lxml' checks for the existence of this package. If you get no response that means the package was successfully found.
could you report what response you get when you execute these commands?

Revision history for this message
Jim.Nickerson (jim-nickerson) wrote :

C:\Program Files (x86)\Inkscape\python\Lib\site-packages\lxml
------------------------
C:\>python
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named lxml
>>> exit()
------------------------
Microsoft Windows [Version 6.0.6002]
Copyright (c) 2006 Microsoft Corporation. All rights reserved.

C:\Program Files (x86)\Inkscape>python
Python 2.5.4 (r254:67916, Dec 23 2008, 15:10:54) [MSC v.1310 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named lxml
>>>
-----------------------
I notice python is also found associated with other software I have installed; csvn and Qt.

Revision history for this message
Jim.Nickerson (jim-nickerson) wrote :

I just installed on my Windows 7 x64 machine, extensions work fine.
Here the python version is 2.6.4
--------------
Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named lxml
>>>

Revision history for this message
Alvin Penner (apenner) wrote :

on the Vista machine, the one with Python 2.5.4, it looks as if you have a previous installation of Python which may be interfering with Inkscape. I believe the Inkscape version should be Python 2.6.5. To get this you may need to run the Python command directly from the Inkscape directory as follows:

C:\Program Files\Inkscape>inkscape -V
RegistryTool: Could not set the value 'C:\Program Files\Inkscape\inkscape.exe'
Inkscape 0.48.2 r9819 (Aug 14 2011)

C:\Program Files\Inkscape>python\python
Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import lxml
>>> quit()

it might be worthwhile to try running Inkscape from a DOS prompt as above to see if this helps.

su_v (suv-lp)
tags: added: extensions-plugins win32
Revision history for this message
jazzynico (jazzynico) wrote :

It looks like you have different Python installs on your computers (I confirm Inkscape 0.48.2 embed Python 2.6.5).
Could you try removing Python from your Path environment?

Revision history for this message
Jim.Nickerson (jim-nickerson) wrote : Re: [Bug 896659] Re: Extensions fail, The fantastic lxml wrapper... , 0.48.2 r9819

Thank you for your efforts.
I no longer use Inkscape on this computer as I use this computer ( and
Python ) for other things.
I tried Inkscape up on my Win7 machine, it does not do what I was looking
for.

On Tue, Feb 7, 2012 at 7:46 AM, JazzyNico <email address hidden> wrote:

> It looks like you have different Python installs on your computers (I
> confirm Inkscape 0.48.2 embed Python 2.6.5).
> Could you try removing Python from your Path environment?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/896659
>
> Title:
> Extensions fail, The fantastic lxml wrapper... , 0.48.2 r9819
>
> Status in Inkscape: A Vector Drawing Tool:
> New
>
> Bug description:
> Inkscape 0.48.2 r9819
> Vista 64
> Windows Vista Ultimate, Service Pack 2
> Dell I-7, Quad core
> All the extensions I tried produce the message:
>
> The fantastic lxml wrapper for libxml2 is required by inkex.py and
> therefore this extension. Please download and install the latest
> version from http://cheeseshop.python.org/pypi/lxml/, or install it
> through your package manager by a command like: sudo apt-get install
> python-lxml
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/inkscape/+bug/896659/+subscriptions
>

Revision history for this message
Alfa cruz (alfacruz-dg) wrote : Re: Extensions fail, The fantastic lxml wrapper... , 0.48.2 r9819

Hi I installed the extension Sozi, when I try to run it the following message appears:

The fantastic lxml wrapper for libxml2 is required by inkex.py and THEREFORE this extension. Please download and install the latest version from http://cheeseshop.python.org/pypi/lxml/, or install it-through your package manager by a command like: sudo apt-get install python-lxml

My OS is Windows 7 Home Premium 64-bit, on a ASUS Notebook Intel Core i5 K52JT.

Python version 2.7 and I downloaded the library lxml-py2.7-2.2.8.win32 as there is not for win64

Is there any way to solve this problem? Thanks

Revision history for this message
Alvin Penner (apenner) wrote :

do any of the other extensions work, for example can you save a file as hpgl or as Desktop Cutting Plotter (DXF R14)?
- where did Sozi come from, I confess I have not heard of it?

Revision history for this message
Daniel Maxwell (cot) wrote :

I had this problem on 64-bit Windows 7 and discovered it was caused by a previous installation of Python, which had installed an environment variable called PYTHONHOME in the system variables. Deleting this variable solved the problem. This isn't at all a satisfactory solution, because whatever it was that was previously using that environment variable now can't, but at least it makes Inkscape work.

He is how to get rid of it:
- From the Start menu, type "System" and select System from the list (under 'Control Panel').
- Click on 'Advanced System Settings' from the panel on the left.
- Click the 'Environment Variables' button at the bottom.
- Under 'System Variables', scroll down until you find a variable called 'PYTHONPATH', write down what its value is, so that you can recreate it if you need it, and then delete it.
-Close and open Inkscape, and try to see if it's worked. (There was no need to restart the computer in my case).

Hope that helps.

This still needs a proper fix to make it work without having to do this!

Revision history for this message
jazzynico (jazzynico) wrote :

The question is: on Windows, should we force Inkscape to use the embedded python version instead of the one defined in the PATH?

Changed in inkscape:
importance: Undecided → Medium
status: New → Triaged
jazzynico (jazzynico)
summary: - Extensions fail, The fantastic lxml wrapper... , 0.48.2 r9819
+ Extensions fail, concurrent Python installations
Revision history for this message
Windell Oskay (windell) wrote :

I have heard three private reports recently, from users that I support, that appear to be this same issue again. All on Windows (7 and 10).

One additional report of this was posted in a forum: https://forum.inkscapecommunity.com/index.php?topic=630.0

It appears that modifying the system path to remove the version defined there is a ugly but functional workaround.

Revision history for this message
Windell Oskay (windell) wrote :
Revision history for this message
Patrick Storz (ede123) wrote :

As I wrote somewhere before I have Python on my search path as well and it works just fine (Windows 10, Inkscape 0.92.x and master).

Instead of quoting other bugs (some of which are probably unrelated and have different sources) it would help if you could instead add information on
- OS/Inkscape version used by those users that you support
- Python version(s) installed by those users
- Environment variables involved
  (and how they were modified in order to fix the problem)
- And most importantly as it can be the source for endless confusion:
  What exactly was the issue experienced by those users?
  Often "me to" comments conceal the specifics of the problematic
  environment when they are made as a result of a similar symptom
  that sometimes can have a completely different cause

This particular bug is about parallel Python installations potentially causing problems.
The error "The fantastic lxml wrapper for libxml2 is required by inkex.py..." on the other hand can be caused by a lot of different issues not necessarily related to this problem.

As far as I can tell the issue tracked here is probably a duplicate of bug #1518278 (or the other way round) as it's specific to the environment variable PYTHONPATH which does *not* need to be set for a typical Python installation as far as I'm aware (at least on Windows it was never set on any of my machines, neither for Python 2 nor for Python 3) but maybe there's specific software / an install switch that sets it and tracking that down might help to find a solution for the users affected.

Revision history for this message
Jonathan Hofinger (jhofinger) wrote :

Closing due to inactivity. Issue is not reproduced in current builds of Inkscape on Windows.

Please feel free to file new bugs about the issues you're seeing at
http://inkscape.org/report.

Closed by: https://gitlab.com/jhofinger

Changed in inkscape:
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.