You are not logged in.

#1 2016-05-12 08:38:05

Goran
Member
Registered: 2012-01-24
Posts: 92

[SOLVED] Vim error: Could not load libpython2.7.so.1.0

When I launch vim, I get:

Error detected while processing /home/goran/.vimrc:
line  110:
E370: Could not load library libpython2.7.so.1.0
E263: Sorry, this command is disabled, the Python library could not be loaded.

My vimrc has some python in it, which I assume should work, because my vim is compiled with "+python3/dyn" support, and I have python3 installed. However, looking at the error, it seems like vim is trying to load and use python2, which is not installed.

Is there a way to tell vim to use python3, instead of trying to load python2?

Last edited by Goran (2016-05-12 22:06:45)

Offline

#2 2016-05-12 08:41:15

WorMzy
Administrator
From: Scotland
Registered: 2010-06-16
Posts: 13,737
Website

Re: [SOLVED] Vim error: Could not load libpython2.7.so.1.0

What is line 110 in your .vimrc? Have you compiled your own vim?


Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD

Making lemonade from lemons since 2015.

Offline

#3 2016-05-12 17:33:35

Goran
Member
Registered: 2012-01-24
Posts: 92

Re: [SOLVED] Vim error: Could not load libpython2.7.so.1.0

WorMzy wrote:

What is line 110 in your .vimrc?

It's "endpython":

 77: python << endpython
  |   # my python code
110: endpython

Have you compiled your own vim?

No, but running "vim --version" gives a list of options with which it was compiled, and one of them is "+python3/dyn".

Offline

#4 2016-05-12 17:50:21

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,426
Website

Re: [SOLVED] Vim error: Could not load libpython2.7.so.1.0

Sigh. So this is where we play "extract the information piece by piece"?

Have you tried running Vim without a .vimrc? Have you considered pasting your entire .vimrc (rather than a useless fragment)? Please read How To Ask Questions The Smart Way.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2016-05-12 19:41:01

Goran
Member
Registered: 2012-01-24
Posts: 92

Re: [SOLVED] Vim error: Could not load libpython2.7.so.1.0

jasonwryan wrote:

Sigh. So this is where we play "extract the information piece by piece"?

There's a lot of "information" on my system, so it made sense to reason about what kind of information would actually be relevant to the problem at hand, and to post only that, instead of dumping virtually everything I assume to be even remotely related.

Have you tried running Vim without a .vimrc?

Yes. That works without errors.

Have you considered pasting your entire .vimrc (rather than a useless fragment)?

No, because the error is caused by the python fragment (if I remove it, everything works without errors).

Please read How To Ask Questions The Smart Way

I'll look into it, but as I explained, I think my approach here was fairly sensible.

My vim installation seems to have python3 support, but it's trying to load and use python2 - that's the core of the problem.

If someone who actually has some notion about why this is happening requests further information, I'll be happy to provide it.

Offline

#6 2016-05-12 20:19:32

headkase
Member
Registered: 2011-12-06
Posts: 2,008

Re: [SOLVED] Vim error: Could not load libpython2.7.so.1.0

Oh man, don't tempt JWR.

https://wiki.archlinux.org/index.php/Fo … ther_users

Especially admins with a ban-hammer.

https://wiki.archlinux.org/index.php/Fo … way_street

Provide what is asked or don't ask for help - we aren't mind-readers.

https://wiki.archlinux.org/index.php/Fo … _the_staff

And the volunteer staff doesn't have to put up with shit.

Offline

#7 2016-05-12 22:05:30

Goran
Member
Registered: 2012-01-24
Posts: 92

Re: [SOLVED] Vim error: Could not load libpython2.7.so.1.0

Provide what is asked or don't ask for help

... ?

I did, and I said that I would be happy to provide further information if requested.

It seems like you misunderstood some part of the exchange: He didn't request my vimrc - he asked if I considered posting it. I responded that I did not, for the reason given.

Objectively, I didn't disrespect anyone.

Anyway, I resolved the issue by changing:

python << endpython

to

python3 << endpython

It was just a guess (as I couldn't find anything about this in the documentation), but it seems to work, so I consider the issue resolved.

Offline

#8 2016-05-12 22:59:44

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: [SOLVED] Vim error: Could not load libpython2.7.so.1.0

If you enter 'python' in the console, which version is launched?


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

Board footer

Powered by FluxBB