ibus-cangjie installation: cangjie Python module not found

20 views
Skip to first unread message

era...@web.de

unread,
May 29, 2016, 8:49:37 AM5/29/16
to Hong Kong Linux User Group
Hello everybody,

I have a question to ask which may or may not sound ridiculously trivial (I'm still fairly new to Linux).

I'm trying to install ibus-cangjie on openSUSE Leap 42.1. Since it's not among the standard repositories, I am compiling it from github clones. I successfully installed libcangjie and pycangjie and now want to compile ibus-cangjie itself. However the autogen.sh fails to find the cangjie Python module and asks me to install it. It is indeed located in the /usr/local/lib64/python3.4/sitepackages directory. I thought that the problem was just that that directory was missing from $PYTHONPATH. So I added it, but it still doesn't find it. I would be happy for suggestions as to what the problem might be.

Thanks in advance.
Sievert

Mathieu Bridon

unread,
May 29, 2016, 10:21:03 AM5/29/16
to hk...@googlegroups.com
Hi there,

I'm the ibus-cangjie upstream developer. :)

On Sun, 2016-05-29 at 05:49 -0700, era...@web.de wrote:
>
> Hello everybody,
>
> I have a question to ask which may or may not sound ridiculously
> trivial (I'm still fairly new to Linux).
>
> I'm trying to install ibus-cangjie on openSUSE Leap 42.1. Since it's
> not among the standard repositories,
So first, can you make it happen?

It would be great to have ibus-cangjie in the repositories of the big
few distributions, and opensuse certainly is one of them.

>
>  I am compiling it from github clones.
I recommend you install from the release tarballs:

https://github.com/Cangjians/libcangjie/releases/download/v1.3/libcan
gjie-1.3.tar.xz
https://github.com/Cangjians/pycangjie/releases/download/v1.2/cangjie
-1.2.tar.xz
https://github.com/Cangjians/ibus-cangjie/releases/download/v2.4/ibus
-cangjie-2.4.tar.xz

>
>  I successfully installed libcangjie and pycangjie and now want to
> compile ibus-cangjie itself. However the autogen.sh fails to find the
> cangjie Python module and asks me to install it. It is indeed located
> in the /usr/local/lib64/python3.4/sitepackages directory. I thought
> that the problem was just that that directory was missing from
> $PYTHONPATH.
If opensuse works like Fedora, then indeed /usr/local/... isn't in the
python path, for good reasons.

The best solution here would be... to install in /usr, not /usr/local,
and in fact to package it for opensuse. :)

Especially, because of the way IBus works, the cangjie.xml and
quick.xml files **must** be in /usr/share/ibus/component/ things just
won't work if they are in /usr/local/share/ibus/component/ .

I know it's pretty terrible to install stuff you compiled in /usr, but
unfortunately, due to IBus, I'm not sure we have a choice, here.

If you have any idea I'd love to improve this, though, but for now,
your best bet is to compile libcangjie, pycangjie and ibus-cangjie
with:  ./configure --prefix=/usr

Let me know if you need more help, you can even come and talk on
#linux-hk on Freenode, I'm bochecha there. :)

Cheers,


-- 
Mathieu

Ryan Chow

unread,
Jun 1, 2016, 4:18:54 PM6/1/16
to Hong Kong Linux User Group
Hi Mathieu,

The same problem persisted  by using the ./configure --prefix=/usr.

Mathieu Bridon

unread,
Jun 1, 2016, 4:38:16 PM6/1/16
to hk...@googlegroups.com
Hi Ryan,

That's very weird.

Can you try opening a python3 shell and importing the cangjie module?

 $ python3
 Python 3.4.3 (default, Mar 31 2016, 20:42:37) 
 [GCC 5.3.1 20151207 (Red Hat 5.3.1-2)] on linux
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import cangjie
 >>> 

Do you get an error message?


-- 
Mathieu

On Wed, 2016-06-01 at 13:18 -0700, Ryan Chow wrote:
>
> Hi Mathieu,
>
> The same problem persisted  by using the ./configure --prefix=/usr.
>
>
> >
> -- 
> You received this message because you are subscribed to the Google
> Groups "Hong Kong Linux User Group" group.
> To unsubscribe from this group and stop receiving emails from it,
> send an email to hklug+un...@googlegroups.com.
> To post to this group, send email to hk...@googlegroups.com.
> Visit this group at https://groups.google.com/group/hklug.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages