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

Ultisnips requires py >= 2.7 or py3 #707

Closed
MichaelDiao opened this Issue Jun 5, 2016 · 15 comments

Comments

Projects
None yet
9 participants
@MichaelDiao

MichaelDiao commented Jun 5, 2016

Hi,everybody.

Issus:
Recently, I install the ultisnips for my vim7.4 which was compiled by myself, but ,after installing the plugin the vim reminds me that "Ultisnips requires py >= 2.7 or py3".

My checks:
What confused me is that python is supported by my vim. For python3, it is just "-" in my vim version. So I guess that py suppoeted by my vim is lower version than py2.7. There is a picture about the message in the end.

My tries:
In terminal, I type "python --version", and got the message that "Python 2.7.6". Obviously, my py version is higher.

Hlep me:
Now, what should i do?

Thanks!

@seletskiy

This comment has been minimized.

Show comment
Hide comment
@seletskiy

seletskiy Jun 5, 2016

Collaborator

@Oliver8668: What is output of the :py import sys; print(sys.version_info) command?

Collaborator

seletskiy commented Jun 5, 2016

@Oliver8668: What is output of the :py import sys; print(sys.version_info) command?

@MichaelDiao

This comment has been minimized.

Show comment
Hide comment
@MichaelDiao

MichaelDiao Jun 5, 2016

@seletskiy :I type the ":py import sys; print(sys.version_info)" command in terminal, this is what you said, right?
I am a new guy for ubuntu system, so I can not get you, sorry

MichaelDiao commented Jun 5, 2016

@seletskiy :I type the ":py import sys; print(sys.version_info)" command in terminal, this is what you said, right?
I am a new guy for ubuntu system, so I can not get you, sorry

@seletskiy

This comment has been minimized.

Show comment
Hide comment
@seletskiy

seletskiy Jun 6, 2016

Collaborator

@Oliver8668: No, you should type it in your vim instance.

Collaborator

seletskiy commented Jun 6, 2016

@Oliver8668: No, you should type it in your vim instance.

@MichaelDiao

This comment has been minimized.

Show comment
Hide comment
@MichaelDiao

MichaelDiao Jun 6, 2016

@seletskiy : OK, I did it as what you said, and got two error as follow:

screenshot from 2016-06-06 10 12 01

So why? what should I do to deal with it?

MichaelDiao commented Jun 6, 2016

@seletskiy : OK, I did it as what you said, and got two error as follow:

screenshot from 2016-06-06 10 12 01

So why? what should I do to deal with it?

@seletskiy

This comment has been minimized.

Show comment
Hide comment
@seletskiy

seletskiy Jun 6, 2016

Collaborator

@Oliver8668: You should install vim with python support using your package manager (apt).

Collaborator

seletskiy commented Jun 6, 2016

@Oliver8668: You should install vim with python support using your package manager (apt).

@MichaelDiao

This comment has been minimized.

Show comment
Hide comment
@MichaelDiao

MichaelDiao Jun 6, 2016

@seletskiy :So happy! I have solved it by reinstalling with new config parameters.
It is as follows: Firstly, I uninstall the current vim. Secondly, I recompile vim7.4 with new config parameters as

sudo ./configure –enable-multibyte \
            --enable-fontset \
            --enable-xim \
            --enable-gui=auto \
            --enable-luainterp=dynamic \
            --enable-pythoninterp=yes \
            --enable-rubyinterp=dynamic \
            --enable-perlinterp \
            --enable-cscope \
            --enable-sniff \
            --with-x \
            --with-compiledby=erocpil \
            --with-features=huge \
            --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu

Then, vim was installed successfully. And The issue that I asked disappeared.

Contrasted with old config parameters of vim, there is only a difference, that is the parameter ---- "--enable-pythoninterp" ---- is "yes" or "dynamic". The old one is "--enable-pythoninterp=dynamic", which leads to the “py library can't be loaded”. If this parameter is "yes", all the problems are solved.But the reason is still unclear for me.

Anyway, I appreciate you very much!

MichaelDiao commented Jun 6, 2016

@seletskiy :So happy! I have solved it by reinstalling with new config parameters.
It is as follows: Firstly, I uninstall the current vim. Secondly, I recompile vim7.4 with new config parameters as

sudo ./configure –enable-multibyte \
            --enable-fontset \
            --enable-xim \
            --enable-gui=auto \
            --enable-luainterp=dynamic \
            --enable-pythoninterp=yes \
            --enable-rubyinterp=dynamic \
            --enable-perlinterp \
            --enable-cscope \
            --enable-sniff \
            --with-x \
            --with-compiledby=erocpil \
            --with-features=huge \
            --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu

Then, vim was installed successfully. And The issue that I asked disappeared.

Contrasted with old config parameters of vim, there is only a difference, that is the parameter ---- "--enable-pythoninterp" ---- is "yes" or "dynamic". The old one is "--enable-pythoninterp=dynamic", which leads to the “py library can't be loaded”. If this parameter is "yes", all the problems are solved.But the reason is still unclear for me.

Anyway, I appreciate you very much!

@MichaelDiao MichaelDiao closed this Jun 6, 2016

@seletskiy

This comment has been minimized.

Show comment
Hide comment
@seletskiy

seletskiy Jun 6, 2016

Collaborator

@Oliver8668: 👍

Collaborator

seletskiy commented Jun 6, 2016

@Oliver8668: 👍

@Wenchao21

This comment has been minimized.

Show comment
Hide comment
@Wenchao21

Wenchao21 Jan 30, 2017

@MichaelDiao Here i hit the issue when i build VIM8.0 from the sources code.....

Issus:
Recently, I install the ultisnips for my vim8.0 which was compiled by myself, but ,after installing the plugin the vim reminds me that "Ultisnips requires py >= 2.7 or py3".

My checks:
I checked my python installed is python2.7.11

My tries:
In terminal, I type "python --version", and got the message that "Python 2.7.11". Obviously, my py version is higher.

please help.

Wenchao21 commented Jan 30, 2017

@MichaelDiao Here i hit the issue when i build VIM8.0 from the sources code.....

Issus:
Recently, I install the ultisnips for my vim8.0 which was compiled by myself, but ,after installing the plugin the vim reminds me that "Ultisnips requires py >= 2.7 or py3".

My checks:
I checked my python installed is python2.7.11

My tries:
In terminal, I type "python --version", and got the message that "Python 2.7.11". Obviously, my py version is higher.

please help.

@Wenchao21

This comment has been minimized.

Show comment
Hide comment
@Wenchao21

Wenchao21 Jan 30, 2017

vim

here is the screen shoot.

thanks.

Wenchao21 commented Jan 30, 2017

vim

here is the screen shoot.

thanks.

@Vagrantin

This comment has been minimized.

Show comment
Hide comment
@Vagrantin

Vagrantin May 15, 2017

@Wenchao21 , once you have started up vim, if you type ":py import sys; print(sys.version_info)" what result do you have ?

Vagrantin commented May 15, 2017

@Wenchao21 , once you have started up vim, if you type ":py import sys; print(sys.version_info)" what result do you have ?

@Konstantin8105

This comment has been minimized.

Show comment
Hide comment
@Konstantin8105

Konstantin8105 commented Jun 22, 2017

py

@eromoe

This comment has been minimized.

Show comment
Hide comment
@eromoe

eromoe Jun 27, 2017

Happen on windows with python installed:

shell git-bash

$ python
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
$ vim
UltiSnips requires py >= 2.7 or py3
Press ENTER or type command to continue
$ vim -version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 25 2017 09:05:56)
Garbage after option argument: "-version"
More info with: "vim -h"

alias:

alias python='winpty python.exe'

try ":py import sys; print(sys.version_info)" :
image

eromoe commented Jun 27, 2017

Happen on windows with python installed:

shell git-bash

$ python
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:42:59) [MSC v.1500 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
$ vim
UltiSnips requires py >= 2.7 or py3
Press ENTER or type command to continue
$ vim -version
VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jan 25 2017 09:05:56)
Garbage after option argument: "-version"
More info with: "vim -h"

alias:

alias python='winpty python.exe'

try ":py import sys; print(sys.version_info)" :
image

@LvChengbin

This comment has been minimized.

Show comment
Hide comment
@LvChengbin

LvChengbin Jul 12, 2018

I encountered the same problem after update my VIM to 8.1 from 8.0.
This is the result of :py import sys; print(sys.version_info)
image

I got Python 2.7.10 by python ---version, and I tried adding --enable-pythoninterp=yes while compiling VIM8.1, but it doesn't work.

LvChengbin commented Jul 12, 2018

I encountered the same problem after update my VIM to 8.1 from 8.0.
This is the result of :py import sys; print(sys.version_info)
image

I got Python 2.7.10 by python ---version, and I tried adding --enable-pythoninterp=yes while compiling VIM8.1, but it doesn't work.

@butterflyepuck

This comment has been minimized.

Show comment
Hide comment
@butterflyepuck

butterflyepuck Aug 2, 2018

I had fixed it with this command:"apt install vim-gtk"

butterflyepuck commented Aug 2, 2018

I had fixed it with this command:"apt install vim-gtk"

@jpoutrin

This comment has been minimized.

Show comment
Hide comment
@jpoutrin

jpoutrin commented Aug 16, 2018

I followed that:
https://github.com/zchee/deoplete-jedi/wiki/Setting-up-Python-for-Neovim

seems to have solved the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment