I want tot use pygments in my python app.
At first, I installed pygments like this:
$sudo python setup.py install --prefix=/usr/local /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'zip_safe' warnings.warn(msg) /usr/lib/python2.7/distutils/dist.py:267: UserWarning: Unknown distribution option: 'include_package_data' warnings.warn(msg) running install running build running build_py running build_scripts running install_lib running install_scripts changing mode of /usr/local/bin/pygmentize to 755 running install_egg_info Removing /usr/local/lib/python2.7/dist-packages/Pygments-1.4-py2.7.egg-info Writing /usr/local/lib/python2.7/dist-packages/Pygments-1.4-py2.7.egg-info
After getting import error (
ImportError: cannot import name highlight
) when trying to
from pygments import highlight, and find out that there is a python-pygments package, I installed it from software center. Now it was installed in /usr/share/pyshared/pygments and there are symlinks in /usr/lib/python2.7/dist-packages/pygments point to that location which is much better then /usr/local/lib/python2.7/dist-packages with manual install.
But I keep getting ImportError.
What am I doing wrong?