[Nix-dev] Lack of exhaustive RPATH for vim and gimp with relation to python

Attila Oláh attilaolah at gmail.com
Sat Feb 12 22:36:14 CET 2011


On 02/12/11 16:23, Marc Weber wrote:
>> Vim
> Do you know whether this is using the py interface of vim (:h if_pyth.txt)
> or whether something is trying to run the python executable ?
> 
> Maybe install python into your user profile and see whether the error goes away.

Interestingly enough, when I install Python 2.7, the problem goes away.
Maybe the script was trying to run Python itself, but then again, I
already had Python in my underlying system, so that should have just
worked. Anyway, no errors now. I just had to copy all the old defaults
from /etf/vim/* to my own .vimrc, and Vim is fine now.

>> Gimp works, however there's no "Python-fu" in the Filters menu.
> Currently I recommend a quick hack: install libs into your user profile.
> -> http://wiki.nixos.org/wiki/Howto_keep_multiple_packages_up_to_date_at_once
> 
> Then export PYTHONPATH or PYTHON_USERBASE in your ~/.bashrc and make it
> point to ~/.nix-profile/lib/python2.6/...  or such.

As I installed Python 2.7, the old ImportError has been replaced with a
new one:

ImportError: could not import pygtk

So, I have installed pygtk into my user profile, but then pygobject was
missing (although it was already in my local nix store), so I installed
that too in my user profile, set up PYTHONPATH, and now I get this error:

aatiis at aiur ~ $ python2.6
Python 2.6.6 (r266:84292, Oct 13 2010, 16:31:12)
[GCC 4.4.4] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import gtk
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File
"/home/aatiis/.nix-profile/lib/python2.6/site-packages/gtk/__init__.py",
line 30, in <module>
    import gobject as _gobject
  File
"/home/aatiis/.nix-profile/lib/python2.6/site-packages/gobject/__init__.py",
line 26, in <module>
    from glib import spawn_async, idle_add, timeout_add,
timeout_add_seconds, \
  File
"/home/aatiis/.nix-profile/lib/python2.6/site-packages/glib/__init__.py", line
22, in <module>
    from glib._glib import *
ImportError:
/home/aatiis/.nix-profile/lib/python2.6/site-packages/glib/_glib.so:
undefined symbol: PyUnicodeUCS2_DecodeUTF8


Moreover, this solution doesn't really fit me, as I'd like to use Python
2.7 as my default python, so having a PYTHONPATH pointing to 2.6's
site-packages is not desirable.

And I'd like to try and build Gimp for the 2.7 Python anyway, it was
working like that in Gentoo :)

So my first impression about Nix is that I'll need to write a whole lot
of nix expressions to get everything I want. If I manage to do that,
I'll make sure to send patches.

Attila

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 900 bytes
Desc: OpenPGP digital signature
Url : http://lists.science.uu.nl/pipermail/nix-dev/attachments/20110212/70911f08/attachment.bin 


More information about the nix-dev mailing list