Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Having trouble importing Latex code into Lyx using tex2lyx

  1. #1
    Join Date
    Nov 2008
    Beans
    37
    Distro
    Ubuntu 10.04 Lucid Lynx

    Having trouble importing Latex code into Lyx using tex2lyx

    Tried directly using tex2lyx as well as using File-Import-Latex (plain) and both give me problems. I've tried known working latex code on the Internet but that doesn't work either, so I don't think I have a bad input on my end.

    Within Lyx, the version shows up as 1.6.0 while from synaptic package manager the installation is package 1.6.4-1ubuntu1.

    The error message from lyx is:
    "An error occurred whilst running tex2lyx -f 'Latex_Output_for_Housing_Class_1.tex'

    The error from the command line (tex2lyx -f Latex_Output_for_Housing_Class_1.tex tmp.lyx ) is more elaborate but no more helpful to me:
    'import site' failed; use -v for traceback
    'import site' failed; use -v for traceback
    Traceback (most recent call last):
    File "/usr/share/lyx/scripts/layout2layout.py", line 15, in <module>
    import os, re, string, sys
    File "/usr/lib/python2.6/os.py", line 49, in <module>
    import posixpath as path
    File "/usr/lib/python2.6/posixpath.py", line 16, in <module>
    import warnings
    File "/usr/lib/python2.6/warnings.py", line 6, in <module>
    import linecache
    ImportError: No module named linecache
    Could not run layout conversion script layout2layout.py.
    We failed to find the layout '' in the layout list. You MUST investigate!
    Segmentation fault

    Any advice on how to fix this problem or work around it? Thanks for the help.

  2. #2
    Join Date
    Nov 2008
    Beans
    37
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Having trouble importing Latex code into Lyx using tex2lyx

    I've attached the source document mentioned above to help with diagnosis. The extension must be changed from txt to tex or the code modified for the existing file.

    I wasn't sure what category to file this under. If it was an incorrect classification, I apologize.
    Attached Files Attached Files

  3. #3
    Join Date
    Nov 2008
    Beans
    37
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Having trouble importing Latex code into Lyx using tex2lyx

    I am still having this problem. I wonder if anyone knows what is going on. I asked on the Lyx mailing list and they suggested there was a problem with my Python installation but could not help further.

    I tried solving the problem by upgrading to Lucid Lynx but that did not help.

    Anyone have any ideas?

  4. #4
    Join Date
    Nov 2008
    Beans
    37
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Having trouble importing Latex code into Lyx using tex2lyx

    This was recently moved into the Education & Science forum and I wanted to put a new post in it to bump it.

    Can anyone help me out?

  5. #5
    Join Date
    May 2007
    Location
    the Netherlands
    Beans
    647
    Distro
    Ubuntu Development Release

    Re: Having trouble importing Latex code into Lyx using tex2lyx

    Quote Originally Posted by TheOneEyedMan View Post
    Within Lyx, the version shows up as 1.6.0 while from synaptic package manager the installation is package 1.6.4-1ubuntu1.
    Does that mean the package is 'pinned' in your package-manager? (In other words: why isn't the package the newest version?)

    File "/usr/lib/python2.6/warnings.py", line 6, in <module>
    import linecache
    ImportError: No module named linecache
    - Is there a linecache module on your system? To search for it, first update the search database (it could take some time):

    sudo updatedb

    - then do the search:

    locate linecache.py
    "Let your roots dig deep into the hot soil... Let our scorching sun and sheeting rain turn your supple beauty into strength. For if our love is to survive, it must grow thorns to pierce the hand of any that would uproot it!"

  6. #6
    Join Date
    Nov 2008
    Beans
    37
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Having trouble importing Latex code into Lyx using tex2lyx

    Just looks installed (solid green box)

    Results of locate linecache.py:
    /usr/lib/python2.6/linecache.py
    /usr/lib/python2.6/linecache.pyc
    /usr/share/lyx/scripts/linecache.py

  7. #7
    Join Date
    May 2007
    Location
    the Netherlands
    Beans
    647
    Distro
    Ubuntu Development Release

    Re: Having trouble importing Latex code into Lyx using tex2lyx

    - What lyx versions are outputted by:

    apt-cache policy lyx

    - Which python versions are installed? Type:

    python

    - and press tab twice (fast) to see all executable python files.
    "Let your roots dig deep into the hot soil... Let our scorching sun and sheeting rain turn your supple beauty into strength. For if our love is to survive, it must grow thorns to pierce the hand of any that would uproot it!"

  8. #8
    Join Date
    Nov 2008
    Beans
    37
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Having trouble importing Latex code into Lyx using tex2lyx

    Results of apt-cache policy lyx

    lyx:
    Installed: 1.6.5-1ubuntu1
    Candidate: 1.6.5-1ubuntu1
    Version table:
    *** 1.6.5-1ubuntu1 0
    500 http://us.archive.ubuntu.com/ubuntu/ lucid/universe Packages
    100 /var/lib/dpkg/status

    The tab-tab thing didn't work. All I get is two tabs on the python command line.
    When I run python from the command line I get the following output.

    Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41)
    [GCC 4.4.3] on linux2
    Type "help", "copyright", "credits" or "license" for more information.

  9. #9
    Join Date
    May 2007
    Location
    the Netherlands
    Beans
    647
    Distro
    Ubuntu Development Release

    Re: Having trouble importing Latex code into Lyx using tex2lyx

    Just type "python" into a gnome/bash terminal (not into a python command line). Instead of pressing Enter, press tab twice to show all possible autocomplete entries. Or just do a manual search in synaptic for python.

    Anyway, if there are multiple versions of python, it could be that lyx is somehow calling a version other than 2.6.5. A good test would be to get rid of the other versions completely (if possible, of course), and perhaps re-install lyx.
    "Let your roots dig deep into the hot soil... Let our scorching sun and sheeting rain turn your supple beauty into strength. For if our love is to survive, it must grow thorns to pierce the hand of any that would uproot it!"

  10. #10
    Join Date
    Nov 2008
    Beans
    37
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Having trouble importing Latex code into Lyx using tex2lyx

    Ah, now I understand. He following is my list of installed packages that include the word "python" in the package name. Nothing jumps out at me as being an old version.

    diveintopython
    idle-python2.6
    ipython
    libboost-python1.40.0
    libpython2.6
    python
    python2.6
    python2.6-doc
    python2.6-examples
    python2.6-minimal
    python-appindicator
    python-apport
    python-apt
    python-aptdaemon
    python-aptdaemon-gtk
    python-at-spi
    python-avahi
    python-beautifulsoup
    python-bittorrent
    python-brasero
    python-brlapi
    python-bugbuddy
    python-cairo
    python-central
    python-cherrypy3
    python-clientform
    python-compizconfig
    python-configglue
    python-couchdb
    python-crypto
    python-cssutils
    python-cups
    python-cupshelpers
    python-daap
    python-dateutil
    python-dbus
    python-debian
    python-desktopcouch
    python-desktopcouch-records
    python-django
    python-django-tagging
    python-egenix-mxdatetime
    python-egenix-mxtools
    python-encutils
    python-evince
    python-evolution
    python-farsight
    python-foolscap
    python-fstab
    python-gconf
    python-gdbm
    python-glade2
    python-gmenu
    python-gnome2
    python-gnome2-desktop
    python-gnomeapplet
    python-gnomecanvas
    python-gnomedesktop
    python-gnomekeyring
    python-gnomeprint
    python-gnupginterface
    python-gobject
    python-gpod
    python-gst0.10
    python-gtk2
    python-gtk2-doc
    python-gtk2-tutorial
    python-gtkglext1
    python-gtkmozembed
    python-gtksourceview2
    python-gtkspell
    python-gtop
    python-httplib2
    python-ibus
    python-imaging
    python-indicate
    python-kde4
    python-keybinder
    python-launchpad-integration
    python-launchpadlib
    python-lazr.restfulclient
    python-lazr.uri
    python-libtorrent
    python-libuser
    python-libxml2
    python-louis
    python-lxml
    python-mako
    python-matplotlib-doc
    python-mechanize
    python-mediaprofiles
    python-metacity
    python-minimal
    python-mmkeys
    python-mutagen
    python-newt
    python-notify
    python-numeric
    python-numpy
    python-numpy-doc
    python-oauth
    python-opengl
    python-openssl
    python-packagekit
    python-papyon
    python-pexpect
    python-pkg-resources
    python-problem-report
    python-protobuf
    python-pyatspi
    python-pycurl
    python-pygoocanvas
    python-pyinotify
    python-pyorbit
    python-pyparsing
    python-pypdf
    python-pyrex
    python-pysqlite2
    python-qt4
    python-rdflib
    python-rsvg
    python-scipy
    python-sexy
    python-simplejson
    python-sip
    python-smartpm
    python-smbc
    python-software-properties
    python-speechd
    python-support
    python-telepathy
    python-tk
    python-totem-plparser
    python-twisted-bin
    python-twisted-core
    python-twisted-names
    python-twisted-web
    python-tz
    python-ubuntuone
    python-ubuntuone-client
    python-ubuntuone-storageprotocol
    python-uno
    python-virtkey
    python-vte
    python-wadllib
    python-webkit
    python-wnck
    python-wxgtk2.6
    python-wxgtk2.8
    python-wxversion
    python-xapian
    python-xdg
    python-xkit
    python-xlib
    python-zope.interface

Page 1 of 2 12 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •