Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mfaytak opened this issue Apr 18, 2019 · 13 comments
Closed

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

mfaytak opened this issue Apr 18, 2019 · 13 comments

Comments

@mfaytak
Copy link

mfaytak commented Apr 18, 2019

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

@sailordiary
Copy link

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

@mfaytak
Copy link
Author

mfaytak commented Apr 22, 2019

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

@mmcauliffe
Copy link
Member

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!

@YingjiaoLiu
Copy link

YingjiaoLiu commented Jul 28, 2020

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

@SachinG007
Copy link

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.

@sybilWsybil
Copy link

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?

@Luzeru
Copy link

Luzeru commented Sep 30, 2020

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 !

@romadomaa
Copy link

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!

@SachinG007
Copy link

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.

@mfaytak
Copy link
Author

mfaytak commented Oct 17, 2020

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

@alayamanas
Copy link

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

@sybilWsybil
Copy link

@zhouyangnk Thank you so much

@HoldON-tts
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants