You are not logged in.

#1 2018-06-05 08:59:16

acgtyrant
Member
From: Hangzhou, China
Registered: 2013-04-09
Posts: 65
Website

[SOLVED] How to get vim with only support to python3?

I do not want to compile it from the beginning, and I can not remove python2 while I have installed many applications depend on python2 too.

Last edited by acgtyrant (2018-06-05 10:21:22)


I use Arch Linux.

Offline

#2 2018-06-05 09:40:32

Allan
Pacman
From: Brisbane, AU
Registered: 2007-06-09
Posts: 11,672
Website

Re: [SOLVED] How to get vim with only support to python3?

Not much else you can do but recompile it...

Offline

#3 2018-06-05 15:25:33

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] How to get vim with only support to python3?

Why do you wish to remove python2 support? Why not just use python3 with the vim package from the repos?


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#4 2018-06-05 15:31:32

acgtyrant
Member
From: Hangzhou, China
Registered: 2013-04-09
Posts: 65
Website

Re: [SOLVED] How to get vim with only support to python3?

@Eschwartz I met the "vim: symbol lookup error: vim: undefined symbol: ..." error in my virtual environment which is created by python 3.6.2. See https://stackoverflow.com/a/32551050/1546088

I think this may because the vim is linked to the needless python 2, I want the vim only use python 3 so that it is compatible with the virtual environment.


I use Arch Linux.

Offline

#5 2018-06-05 15:49:28

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] How to get vim with only support to python3?

That link says that vim would need to be compiled in your virtualenv against the python3 from the virtualenv, and python2 should be irrelevant.

Have you considered upgrading your virtualenv to use the current version of the system python? Python 3 actually comes with a very nice venv module in the stdlib which handles this much better.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2018-06-06 01:36:16

acgtyrant
Member
From: Hangzhou, China
Registered: 2013-04-09
Posts: 65
Website

Re: [SOLVED] How to get vim with only support to python3?

@Eschwartz I use `python -m venv` to create the virtual environment actually.


I use Arch Linux.

Offline

#7 2018-06-06 15:41:34

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [SOLVED] How to get vim with only support to python3?

Well, I'm not sure what to say besides "it works fine for me". Which versions of vim and python do you have installed?

(Note also that vim will not load the site-packages directory when run inside the virtualenv.)


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#8 2018-06-06 23:18:26

acgtyrant
Member
From: Hangzhou, China
Registered: 2013-04-09
Posts: 65
Website

Re: [SOLVED] How to get vim with only support to python3?

@Eschwartz I can not reproduce the error suddenly now, thank you anyway.


I use Arch Linux.

Offline

Board footer

Powered by FluxBB