kakaobrain/word2word

Linux: Permission denied error

owenljn opened this issue · 1 comments

This command would generate permission denied error in linux if user doesn't have root privilege:
en2fr = Word2word("en", "fr")

PermissionError: [Errno 13] Permission denied: '/usr/share/word2word'

To fix this, change line 15 of utils.py from savedir = "/usr/share/word2word" to savedir = "/tmp/word2word"

This should make the program use user's home directory by default.

Hi @owenljn,

Apologies for the delayed response. The updated version now saves the pickle files to the user's home directory.
https://github.com/Kyubyong/word2word/blob/master/word2word/utils.py#L20

You can also change the save directory by giving the custom_savedir option:

from word2word import Word2word
en2fr = Word2word('en', 'fr', custom_savedir='custom_savedir')

Thanks for trying out our package!