seebk / LaTeXText

Inkscape extension to render text as Latex
GNU General Public License v3.0
140 stars 19 forks source link

ImportError: No module named site #26

Open Tastaturtaste opened 4 years ago

Tastaturtaste commented 4 years ago

Trying to render LaTeX in a .svg using this Extension with "Extensions>Render>Text with Latex (GTK3)" opens a new window stating:

Inkscape has received additional data from the script executed.  The script did not return an error, but this may indicate the results will not be as expected.

ImportError: No module named site

No Layer for the rendered LaTeX is being created.

I am on a Windows 10 environment and installed this extension using the .exe installer. Dependencies: Inkscape 0.92.4 MiKTeX 2.9.7050 64-bit

seebk commented 4 years ago

What Inkscape version do you have installed?

seebk commented 4 years ago

Oh I did not see you edited the item and added version info. Inkscape 0.92 should be OK. Can you post the output when you enable the 'Show log message' option in the UI?

Tastaturtaste commented 4 years ago

There is no additional output as far as I can see. I attached a picture of all UIs and Windows.

inkscape latextext bugreport

seebk commented 4 years ago

That looks strange. Sorry, I don't have any immediate idea what could be the problem...

Maybe a conflict with another extension or a broken Inkscape install? Or there is something uncommon with the SVG file?

I just downloaded and reinstalled Inkscape 0.92.4 and LaTexText 0.1.2 on my Windows laptop and it works for me.

Tastaturtaste commented 4 years ago

After receiving the same error with another extension, I tracked the issue down to an unset environment variable, 'PYTHONPATH'. This variable should point to '.../PythonXY/Lib'. I don't know why this variable was not set while installing python. The also required variable 'PYTHONHOME' was correctly set. After correcting this, I now get another error: File "C:\Python\Python37\Lib/site.py", line 177 file=sys.stderr) ^ SyntaxError: invalid syntax I have another picture with the errors attached. Annotation 2020-03-10 144413

As you can see, this error probably stems from using a python version >= 3.0, since version < 3.0 is a requirement mentioned in the installation instructions for Linux. Maybe this should be listed as a general requirement?

Is there some way to execute this extension with python 3.x? I don't really want to install a deprecated version of python if it is avoidable...