Dear apertiumers:

I may have sent this message to the wrong list, or twice. Apologies if you receive it more than once.

Following up on Adam Bittlingmayer's Telegram message and this comment on StackOverflow,

https://stackoverflow.com/questions/73151814/apertium-package-in-python-returns-module-not-installed-error-after-installing-m

 I tried installing apertium on a python virtual environment:

conda create -m apertium python=3

conda activate apertium

pip install apertium

I wonder why it asked me for root permissions I would expect this to be different in a virtual environment (where it would have to install all of apertium!). I went on, and then, in a python shell, I executed his sequence of commands

|import apertium apertium.installer.install_module("eng") apertium.installer.install_module("deu") apertium.installer.install_module("eng-deu")|

I was surprised to see that the system asked me again for my root password, probably for monolingual or bilingual modules not installed.

Then I ran

|r = apertium.Translator('eng', 'deu') print(r.translate('cats'))|

and sure, the first time it failed, saying something about the module not installed, but restarting the shell it worked!

But then it segfaulted and dumped the core on a longer sentence (did not with other).

>>> print(r.translate('Cats are beautiful.'))
Violació de segment (s'ha bolcat la memòria)

Any idea what may be going on?

(1) why does it need to install apertium things with root privileges when ran from a virtual env?

(2) why does it say the module is not installed unless I restart the shell?

Thanks a million!

Mikel

--
Mikel L. Forcada
Dept. de Llenguatges i Sistemes Informàtics
Edifici Politècnica IV,
Universitat d'Alacant
E-03690 Sant Vicent del Raspeig (Spain)

Phone: +34 96 590 9776
m...@dlsi.ua.es
_______________________________________________
Apertium-stuff mailing list
Apertium-stuff@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/apertium-stuff

Reply via email to