Montreal-Forced-Aligner
Montreal-Forced-Aligner copied to clipboard
Missing libpython3.6m.so in Linux v1.0.1
From a fresh download of v1.0.1 on my device (running Ubuntu16.04 xenial). Test running /bin/mfa_align to see usage instructions results in the following error message.
[1695] Error loading Python lib '/opt/montreal-forced-aligner/lib/libpython3.6m.so': dlopen: /opt/montreal-forced-aligner/lib/libpython3.6m.so: cannot open shared object file: No such file or directory).
In case it's informative, running mfa_train_g2p and mfa_generate_dictionary generates the same error, but running mfa_train_and_align does not.
Thanks for an otherwise great piece of software (the Windows version of v1.0.1 is great),
Same here. All I had to do was ln -s lib/libpython3.6m.so.1.0 lib/libpython3.6m.so
.
@sailordiary Creating a link to the handle of the missing file actually did not work in my case. However, copying the contents of lib/libpython3.6m.so.1.0 to lib/libpython3.6m.so does seem to fix the problem.
Thanks for the workarounds! I think this is probably caused by having upgraded the freezing package. I'll try to get this fixed up for the release soon!
@sailordiary Creating a link to the handle of the missing file actually did not work in my case. However, copying the contents of lib/libpython3.6m.so.1.0 to lib/libpython3.6m.so does seem to fix the problem.
After copying as you suggested, my conda just broken and can not activate. Do you know how to undo this copy and fix the conda?
Traceback (most recent call last): File "/home/s1819678/miniconda3/bin/conda", line 12, in
from conda.cli import main File "/home/s1819678/miniconda3/lib/python3.7/site-packages/conda/init.py", line 5, in from future import absolute_import, division, print_function, unicode_literals ModuleNotFoundError: No module named 'future'
Hey, To all those who are unable to resolve this issue in linux Shift to the windows version, I can confirm that it works perfectly there without this issue. This seems to be just a linux based issue.
hi: I have got the same error: when i run bin/mfa_align: [4191] Error loading Python lib '/home/baby/weishu/code/Montreal-Forced-Aligner-1.0.1/dist/montreal-forced-aligner/bin/libpython3.7m.so.1.0': dlopen: /home/baby/weishu/code/Montreal-Forced-Aligner-1.0.1/dist/montreal-forced-aligner/bin/libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
and I have to do : ln -s ../lib/libpython3.7m.so.1.0 libpython3.7m.so.1.0
and then I got a new error: Fatal Python error: initfsencoding: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fed17cea740 (most recent call first): [1] 4228 abort (core dumped) bin/mfa_align
how can I solve it?
hi: I have got the same error: when i run bin/mfa_align: [4191] Error loading Python lib '/home/baby/weishu/code/Montreal-Forced-Aligner-1.0.1/dist/montreal-forced-aligner/bin/libpython3.7m.so.1.0': dlopen: /home/baby/weishu/code/Montreal-Forced-Aligner-1.0.1/dist/montreal-forced-aligner/bin/libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
and I have to do : ln -s ../lib/libpython3.7m.so.1.0 libpython3.7m.so.1.0
and then I got a new error: Fatal Python error: initfsencoding: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fed17cea740 (most recent call first): [1] 4228 abort (core dumped) bin/mfa_align
how can I solve it?
have you solve it ? I met the same error with you !
hi: I have got the same error: when i run bin/mfa_align: [4191] Error loading Python lib '/home/baby/weishu/code/Montreal-Forced-Aligner-1.0.1/dist/montreal-forced-aligner/bin/libpython3.7m.so.1.0': dlopen: /home/baby/weishu/code/Montreal-Forced-Aligner-1.0.1/dist/montreal-forced-aligner/bin/libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
and I have to do : ln -s ../lib/libpython3.7m.so.1.0 libpython3.7m.so.1.0
and then I got a new error: Fatal Python error: initfsencoding: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fed17cea740 (most recent call first): [1] 4228 abort (core dumped) bin/mfa_align
how can I solve it?
me too,if you solved plz give answer!
As I mentioned in my previous comment, this is a known issue with the python version of the Montreal Forced Aligner. Try using the windows version of the same and it will work perfectly.
@sybilWsybil @Luzeru @romadomaa I also originally attempted to make the symlink with ln -s
as in the earlier answer. This also didn't fix the issue for me. So from a fresh install I literally copied the file libpython3.6m.so.1.0 to libpython3.6m.so - in other words, just give the MFA the file it is looking for. To be clear, that would be cp [pathtofile]/lib/libpython3.6m.so.1.0 [pathtofile]/lib/libpython3.6m.so
.
@Luzeru I also noticed - there is an extra ..
in your first file path in the ln -s
command, suggesting you are not creating the symlink from the right directory - if you need to ..
back one level then the link to ./libpython3.6m.so isn't going to be in the same directory as the other file. Not sure if this relates to your and the others' newer issue (the core dumped
message).
hi: I have got the same error: when i run bin/mfa_align: [4191] Error loading Python lib '/home/baby/weishu/code/Montreal-Forced-Aligner-1.0.1/dist/montreal-forced-aligner/bin/libpython3.7m.so.1.0': dlopen: /home/baby/weishu/code/Montreal-Forced-Aligner-1.0.1/dist/montreal-forced-aligner/bin/libpython3.7m.so.1.0: cannot open shared object file: No such file or directory
and I have to do : ln -s ../lib/libpython3.7m.so.1.0 libpython3.7m.so.1.0
and then I got a new error: Fatal Python error: initfsencoding: Unable to get the locale encoding ModuleNotFoundError: No module named 'encodings'
Current thread 0x00007fed17cea740 (most recent call first): [1] 4228 abort (core dumped) bin/mfa_align
how can I solve it?
in your case
cd /home/baby/weishu/code/Montreal-Forced-Aligner-1.0.1/dist/montreal-forced-aligner/lib
cp [path/to/your/libpython3.7m.so.1.0] .
ln -s libpython3.7m.so.1.0 libpython3.7m.so.1
ln -s libpython3.7m.so.1.0 libpython3.7m.so
./align
Do not run soft link bin/mfa_align
, run lib/align
instead
@zhouyangnk Thank you so much
hey, look carefully in the lib path, maybe you just need the following command line to change the file_name
cp libpython3.6m.so.1.0 -r libpython3.6m.so
copy and rename it.