cwoac/nvvim

Can't get xapian to be recognized in Nvim

Closed this issue · 2 comments

System : Mac OSX Latest

I installed xapian-core using ports -

Aarons-MacBook-Air:plugin aaron$ sudo port install xapian-core
---> Computing dependencies for xapian-core
---> Fetching archive for xapian-core
---> Attempting to fetch xapian-core-1.2.8_1.darwin_13.x86_64.tbz2 from http://packages.macports.org/xapian-core
---> Attempting to fetch xapian-core-1.2.8_1.darwin_13.x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/xapian-core
---> Attempting to fetch xapian-core-1.2.8_1.darwin_13.x86_64.tbz2 from http://nue.de.packages.macports.org/macports/packages/xapian-core
---> Fetching distfiles for xapian-core
---> Attempting to fetch xapian-core-1.2.8.tar.gz from http://distfiles.macports.org/xapian-core
---> Verifying checksums for xapian-core
---> Extracting xapian-core
---> Configuring xapian-core
---> Building xapian-core
---> Staging xapian-core into destroot
---> Installing xapian-core @1.2.8_1
---> Activating xapian-core @1.2.8_1
---> Cleaning xapian-core
---> Updating database of binaries: 100.0%
---> Scanning binaries for linking errors: 100.0%
---> No broken files found.

I then opened vim and tried to open nvim using :Nvim. I received some errors -
Error detected while processing function NVIM_init...10_DefPython:
Traceback (most recent call last):
File "/Users/Aaron/.vim/plugin/python/nvim.py", line 3 import xapian
ImportError: No module named xapian


Could some one please let me know what I need to do to get Nvim to recognize that I have installed xapian. I am guessing I need to point the import xapian inside nvim.py at a "hard coded" address. Something like

import /usr/libs/xapian

Can someone let me know if I am on the right track or if there is an easier way to get the system to understand where xapian is located now for vim?

I have fixed this by changing my default version of python to one installed by macports. This now functions correctly.

Hi both

Just a quick note to say that I had this problem and fixed it by:

brew uninstall xapian

brew install xapian --with-python

Brew then gives the following message:

Python modules have been installed and Homebrew's site-packages is not
in your Python sys.path, so you will not be able to import the modules
this formula installed. If you plan to develop with these modules,
please run:
mkdir -p /Users/ianuser/Library/Python/2.7/lib/python/site-packages
echo 'import site; site.addsitedir("/usr/local/lib/python2.7/site-packages")' >> /Users/ianuser/Library/Python/2.7/lib/python/site-packages/homebrew.pth

As advised, I ran the two commands. Nvim now starts normally.

cheers

Ian