Montreal-Forced-Aligner icon indicating copy to clipboard operation
Montreal-Forced-Aligner copied to clipboard

Missing libpython3.6m.so in Linux v1.0.1

Open mfaytak opened this issue 5 years ago • 13 comments

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),

mfaytak avatar Apr 18 '19 06:04 mfaytak

Same here. All I had to do was ln -s lib/libpython3.6m.so.1.0 lib/libpython3.6m.so.

sailordiary avatar Apr 20 '19 07:04 sailordiary

@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.

mfaytak avatar Apr 22 '19 22:04 mfaytak

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!

mmcauliffe avatar Apr 23 '19 21:04 mmcauliffe

@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'

YingjiaoLiu avatar Jul 28 '20 02:07 YingjiaoLiu

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.

SachinG007 avatar Aug 23 '20 18:08 SachinG007

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?

sybilWsybil avatar Sep 02 '20 02:09 sybilWsybil

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 !

Luzeru avatar Sep 30 '20 03:09 Luzeru

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!

romadomaa avatar Oct 17 '20 01:10 romadomaa

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.

SachinG007 avatar Oct 17 '20 03:10 SachinG007

@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).

mfaytak avatar Oct 17 '20 08:10 mfaytak

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

alayamanas avatar Dec 05 '20 12:12 alayamanas

@zhouyangnk Thank you so much

sybilWsybil avatar Dec 09 '20 00:12 sybilWsybil

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.

HoldON-tts avatar May 14 '21 08:05 HoldON-tts