You are not logged in.

#1 2020-01-10 15:52:28

MerrinX
Member
From: Norway
Registered: 2020-01-10
Posts: 4

Vim compiled with +python

Hey there, i do not know if this was the correct place to ask this question.
I am a converted Gentoo user, and run into this problem.

When i try to use pymode in vim, i get an error: pymode requires vim to be compiled with +python.
My vim is x86_64, version 8.2 and use python 3.8.1

my vim --version say that vim is +python. So this one got me wondering...

Any assist would be much appreciated

Offline

#2 2020-01-10 17:27:51

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,047

Re: Vim compiled with +python

Welcome to Arch, I'm just starting to use python so I can't say much about that;)
However I'm using vim for everything I can use it for so thanks for the tip on 'python-mode' it might come handy later on..
So I'm using vim-plug-git and installed python-mode and it does install together with it's 'dependencies'.
I have opened a python file and it 'seems' to work, mind I have not tested things fully..

I see you refer to python 2(+python) I saw a refer on the GitHub page about that, have you read it? Hope it helps.

Offline

#3 2020-01-10 17:34:47

MerrinX
Member
From: Norway
Registered: 2020-01-10
Posts: 4

Re: Vim compiled with +python

qinohe wrote:

Welcome to Arch, I'm just starting to use python so I can't say much about that;)
However I'm using vim for everything I can use it for so thanks for the tip on 'python-mode' it might come handy later on..
So I'm using vim-plug-git and installed python-mode and it does install together with it's 'dependencies'.
I have opened a python file and it 'seems' to work, mind I have not tested things fully..

I see you refer to python 2(+python) I saw a refer on the GitHub page about that, have you read it? Hope it helps.

Hey, thank you for answering me. I use vundle as a plugin manager in vim. I did read some on git regarding this, and some had success in recompiling vim with python.
but in  my vim it says it has support for python. so i do not know.

Offline

#4 2020-01-10 17:44:28

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,047

Re: Vim compiled with +python

Right, okay I don't know if I'm able to give a solution, but lets do the pre work at least;)

Output of:
vim --version|grep python

and in vim:
:PymodePython import sys; print(sys.version_info)

edit:
I have my doubts though you get it  to work the way you want..
They clearly say;

From 2019-12-14 onwards python-mode dropped python2 suuport.
If you still need to use it with python2 you should look for the last-py2-support branch and/or tag.

You may seek another plugin to get support for python2..
Since I'm just starting with python I wont use '2' and will only code '3'.

Last edited by qinohe (2020-01-10 18:13:36)

Offline

#5 2020-01-10 18:33:29

MerrinX
Member
From: Norway
Registered: 2020-01-10
Posts: 4

Re: Vim compiled with +python

vim --version | grep python     
                             
+cmdline_info      +libcall           +python/dyn        +visual
+comments          +linebreak         +python3/dyn       +visualextra

when trying to
:PymodePython import sys; print(sys.version_info) it return: Undefined variable: import

Offline

#6 2020-01-10 18:43:42

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,047

Re: Vim compiled with +python

Hmm, that seems a little odd..
You said you had vim recompiled with python, could you just install vim[extra]?
That's the version I use without any special modification to get python 'working' at least.

Btw. nice tool, works very well with airline too;)

edit: I don''t dare say anything about vundle but isn't something like 'oh-my-zsh' for zsh(which I really don't like) maybe try a different plugin manager later on if nothing works..

Last edited by qinohe (2020-01-10 18:52:07)

Offline

#7 2020-01-13 20:16:19

MerrinX
Member
From: Norway
Registered: 2020-01-10
Posts: 4

Re: Vim compiled with +python

Sorry for the long time to reply, checked up and found that pymode does not support 3.8 yet, it is a problem with lint.wim.
So Im currently back to basic and waiting for an update.

Thank you for helping though smile

Offline

#8 2020-01-14 00:31:29

qinohe
Member
From: Netherlands
Registered: 2012-06-20
Posts: 1,047

Re: Vim compiled with +python

Ah, yes I see, the thing is it only happens when opened in 'venv' I get error in linter etc. I have looked at the files it points at, though I can't make anything of it..
It's not happening when opening the same file in vim outside venv, of course with plugin..
Is that supposed to?

edit: Aha. this only happens if you 'pip install pylint --upgrade'. I have tested this in 'venv'
My native env. doesn't produce this error, since I don't do anything with pip there.
Before I installed pylint in venv the error is also not there;)

edit2: I clearly should have investigated a little further, it is also true for the official repo, python-pylint[Extra]
The version I'm sure it works with is the git version, which I use.
If you can't wait for an update ditch Vundle and use Vim-plug(-git) also from AUR BTW.

Last edited by qinohe (2020-01-14 13:41:23)

Offline

Board footer

Powered by FluxBB