Friday, March 6, 2015

Re: Unable to get omnicomplete to work for Python 3.4.3.

On Fri, Mar 6, 2015 at 10:48 AM, Ben Fritz <fritzophrenic@gmail.com> wrote:
> On Friday, March 6, 2015 at 10:26:59 AM UTC-6, boB Stepp wrote:
>> On Fri, Mar 6, 2015 at 9:50 AM, Ben Fritz <fritzophrenic@gmail.com> wrote:
>> > On Friday, March 6, 2015 at 9:47:03 AM UTC-6, Ben Fritz wrote:
>> >> On Friday, March 6, 2015 at 9:35:25 AM UTC-6, boB Stepp wrote:
>> >> > On Fri, Mar 6, 2015 at 1:05 AM, Christian Brabandt <cblists@256bit.org> wrote:
>> >> > > Hi boB!
>> >> > >
>> >> > > On Fr, 06 Mär 2015, boB Stepp wrote:
>> >> > >
>> >> > >> I am very new to Vim and am in the process of setting up Vim for use
>> >> > >> as my Python 3 editing environment as I continue to work on learning
>> >> > >> Python. I thought it would be nice to use omnicompletion and have been
>> >> > >> struggling to get it to work. A portion of my Vim version
>> >> > >> information::
>> >> > >>
>> >> > >> VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Mar 2 2015 21:15:22)
>> >> > >> MS-Windows 64-bit GUI version with OLE support
>> >> > >> Included patches: 1-648
>> >> > >> Compiled by hp@HP-PC
>> >> > >> Huge version with GUI. Features included (+) or not (-):
>> >> > >> +acl +digraphs +libcall +profile
>> >> > >> +textobjects
>> >> > >> +arabic +directx +linebreak
>> >> > >> +python/dyn +title
>> >> > >> +autocmd -dnd +lispindent +python3/dyn
>> >> > >>
>> >> > >> I am using 64-bit Vim 7.4, 64-bit Win7, and 64-bit Python 3.4.3. If I type:
>> >> > >>
>> >> > >> :python3 import sys; print(sys.version)
>> >> > >>
>> >> > >> I get
>> >> > >>
>> >> > >> 3.4.3 (v3.4.3:9b73f1c3e601, Feb 24 2015, 22:44:40) [MSC v.1600 64 bit (AMD64)]
>> >> > >>
>> >>
>> >> I see your Vim is compiled with dynamic python3 support.
>> >>
>> >> You're on Windows. Does the DLL version match what Vim was compiled with? Later in the version information, my Vim with Python 2 has "-DDYNAMIC_PYTHON_DLL=\"python27.dll\"". Does yours have something similar for Python 3, and does it match your installed python 3 DLL? Is this python 3 DLL somewhere on your system path where Vim can find it?
>> >
>> > Oh, whoops. I wrote without fully reading again. It looks like your Vim is fully capable of running :python3 commands.
>> >
>> > However the error message you are getting from your plugin is saying you don't have python support. Perhaps it is looking for python 2 support instead of python 3 for some reason? If I understand correctly Vim cannot run both python 2 and python 3 at the same time; if you have a mix of python versions used in your plugins then it will not work.
>>
>> How can I answer this question? So far I have installed Git, Pathogen
>> and a collection of various color schemes. Anything else was already
>> bundled with Vim.
>>
>> My initial thoughts were:
>>
>> 1) As far as I can tell, my Vim installation is finding my Python
>> 3 installation. But on the recommendation of an article linked to from
>> the Vim I moved the autoload folder from where it originally was to
>> $HOME\Vim\vimfiles\autoload . This seems to be where the
>> pythoncomplete.vim and python3complete.vim files are stored. Could it
>> be Vim is not properly accessing these any more? Is there some type of
>> path setting to the autoload folder that might need to be reset?
>>
>> 2) Prior to installing Vim, I had both Python 2.7 and Python 3.4
>> installed. AFTER having installed Vim, I decided to uninstall Python
>> 2.7. After I had done so I could no longer type into the Vim command
>> line "python3 print("whatever...")" and get a non-error result.
>> Because of this I uninstalled Python 3.4.2, checked the Python site to
>> see if they had released a newer release, which they did, and
>> installed 3.4.3. This recovered my ability to type in Python commands
>> in the Vim command line and get an error-free result. Could this have
>> mangled something?
>
> Well, your error is "E117: Unknown function: pythoncomplete#Complete"
>
> I don't know anything about these two plugins, but it looks like you wanted to use python3complete, but Vim is trying to use pythoncomplete.
>
> I'm not sure if there is configuration you need to do to select between them, but I'd guess the pythoncomplete version uses python 2 (which you don't have installed anymore) whereas python3complete hopefully uses python 3.
>
> Are these two separate plugins? Could you uninstall the python 2 version? Or look in the plugin help for how to configure python 2 vs. python 3.

I am not seeing anything in the help that I am seeing as a solution to
my dilemma. I guess I am going to bite the bullet, uninstall Vim and
reinstall it. Perhaps during installation it will see that there is no
Python 2 installed, only Python 3 and will configure itself
appropriately. Not elegant, but I do not know enough for an elegant
approach. At least this might eliminate a few things and make it
easier for further assistance. I'll let everyone know what transpires.

--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment