YouCompleteme unavailable : no module named future - vim

i am trying to install the YouCompleteMe Plugin in vim using Vundle but i get this error message : YouCompleteme unavailable : no module named future
i have vim 7.4.1910 and python 3.5.2 but i don't know if vim was built to support python3

its that your modules are not updated or future module is not found.
to fix this. if you are using ubuntu then first go to
$ cd ~/.vim/bundle/YouCompleteMe && git submodule update --init --recursive
this will update all the modules in youcompleteme

I had the same issue and fixed it by running pip install future. You may have to do this with sudo.

Related

YouCompleteMe unavailable: module 'collections' has no attribute 'Mapping'

Hi I have been trying to setup YouCompleteMe in vim but it don't work. I am using vim-plug. I tried around 3 different YouCompleteMe repositories but i always got the same error. I am using a Mac os and everything about vim is up to date. I tried adding scripts in .vimrc, running install.py but non of em worked. I really need Help. Here is my .vimrc script and the error
The easiest way to fix the problem is to install youcompleteme in the following way.
In a Terminal, run the command:
$ sudo apt install vim-youcompleteme
Next, run the command:
$ vim-addon-manager install youcompleteme
I got my exactly the same problem fixed a minute ago by running the above two commands, thanks to dominoc925's youcompleteme installation instructions.

YCM error. The ycmd server SHUT DOWN (restart wit...the instructions in the documentation

I installed YCM with vim plug, but I may have shut down before process finished. Now when I start vim I get this error "The ycmd server SHUT DOWN (restart wit...the instructions in the documentation."
I've googled but can not find workable solution. I don't see anything in the documentation that helps. But I am new to vim and coding in general so may be missing something.
:YcmDebugInfo comes back with "Server errored, no debug info from server".
I have tried :YcmRestartServer, but to no result -- it pauses then returns the same error. I have also run :PlugInstall and :PlugUpdate, and all plug ins, including YCM, are coming back as up to date.
I ran into the same issue with Vundle and fixed it like this:
After installing cmake, I cd'd into ~.vim/bundle/YouCompleteMe and ran
python install.py
Another problem that may cause that error is conda, you should run install.py from the python's system and not the conda one, to do that use
/usr/bin/python ./install.py
from the youcompleteme folder inside vim
I was also facing the same problem with vim and I am using vim-plug plugin manager. To overcome this I did this:
cd ~/.vim/plugged/youcompleteme
python3 install.py
Done !!!
I was also facing the same issue but I have solved by executing the following commands in the Ubuntu terminal
cd ~/.vim/bundle/YouCompleteMe/
sudo pip install cmake
python install.py
or
cd ~/.vim/bundle/YouCompleteMe/
sudo pip install cmake
python3 install.py
Here is how I have solved
Mac OS Catalina 10.15.3
python 3.7
vim 8.2
Install ycm with 'Vim-plug' using Plug 'ycm-core/YouCompleteMe'
cd ~/.vim/plugged/YouCompleteMe
brew install cmake
python ./install.py
$ cd ~/.vim/plugged/youcompleteme
$ bash install.sh
(or)
$ python3 install.py
It will only work if you have installed the python3.7 version
Here is how I did this recently with following environments
Mac OS Mojave 10.14.3
Vim 8.1.300
Python 3.7
Java version 1.8.0_40
$vim --version | grep python
+comments +libcall -python +viminfo
+conceal +linebreak +python3 +vreplace
Installed ycm with Vundle using Plugin 'Valloric/YouCompleteMe' and then running :PluginInstall
The plugins in downloaded to ~/.vim/bundle/YouCompleteMe
$cd ~/.vim/bundle/YouCompleteMe
$python3 installer.py --java-completer
This creates appropriate files under /.vim/bundle/YouCompleteMe/third_party/ycmd/third_party/eclipse.jdt.ls (make sure these and inner directories are not owned by root unless you always work as a root)
now open vim and execute :YcmRestartServer
You should be good to go.
Try :YcmDebugInfo to check if everything is fine
Printing YouCompleteMe debug information...
-- Client logfile: /var/folders/t4/y8zpydv91sv2dszlb1_3qw_r0000gn/T/ycm_1xgp1ub9.log
-- Server Python interpreter: /usr/local/bin/python
-- Server Python version: 3.7.0
-- Server has Clang support compiled in: False
-- Clang version: None
-- Extra configuration file found but not loaded
-- Extra configuration path: ~/.vim/bundle/YouCompleteMe/third_party/ycmd/.ycm_extra_conf.py
-- Server running at: http://127.0.0.1:58050
-- Server process ID: 2334
-- Server logfiles:
-- /var/folders/t4/y8zpydv91sv2dszlb1_3qw_r0000gn/T/ycmd_58050_stdout_wzk9oksu.log
-- /var/folders/t4/y8zpydv91sv2dszlb1_3qw_r0000gn/T/ycmd_58050_stderr_xjb7zjn2.log
CentOS Linux release 7.6.1810 (Core)
Vim 8.1.1362
Python 3.7.3
Java openjdk version "1.8.0_191"
Overall process remains same, but I had couple of difficulties on Centos
Vim was not compiled with Python support
sudo vi /etc/ld.so.conf
added /usr/local/lib to it which had libpython3.7m.so.1.0 file
sudo ldconfig
git clone https://github.com/vim/vim.git
cd vim
./configure --prefix=/usr/local/ --enable-python3interp=yes --with-python3-command=/usr/local/bin/python --with-python3-config-dir=
Rest of the procedure remains the same.
2023:
macOS Monterey
Anaconda
Python installed with homebrew
Had to :
cd ~/.vim/bundle/YouCompleteMe/
# DONT use conda python in the following install step
/opt/homebrew/bin/python3 ./install.py

Vim youcompleteme not working in Debian Jessie

According to this article code completion should work for any language with youcompleteme plugin. I set it up as follows in Debian Jessie:
installed vim from repository
installed youcompleteme from repository
issued 'vam install youcompleteme' in cli
After the last step vim start significantly slower, which means that it is loading the plugin. However, completion does not work.
The output of
$ vam status
Name User Status System Status
editexisting removed removed
justify installed removed
matchit removed removed
youcompleteme installed removed
Is there anything else I have to do to get youcompleteme working?
I contacted the maintainer and finally got the missing hint. As it turns out, all I had left to do was to enable filetype recognition.
In case someone else struggles with this, here are some instructions on how to setup Vim with the Debian package vim-youcompleteme.
Install vim and vim-youcompleteme packages
$ sudo apt-get install vim vim-youcompleteme
This will also install any required dependencies automatically. Afterwards you will have to issue the following command
$ vam install youcompleteme
The last command will create ~/.vim folder in your home folder. However, code completion does not work yet. Some further modifications are required. First copy the default ycm_extra_conf.py file to the newly created ~/.vim/ folder
$ cp /usr/share/doc/vim-youcompleteme/examples/ycm_extra_conf.py ~/.vim/.ycm_extra_conf.py
Then we need to tell vim to use this file for code completion in our .vim.rc and to turn on filetype recognition. The following two lines should be added to ~/.vimrc:
let g:ycm_global_ycm_extra_conf = "~/.vim/.ycm_extra_conf.py"
filetype on
Now vim should be able to use code completion, e.g., with C++ files.
You should follow the installation instructions for YCM, including how to compile it:
Install development tools and CMake: sudo apt-get install
build-essential cmake
Make sure you have Python headers installed: sudo apt-get install
python-dev.
Compiling YCM with semantic support for C-family languages:
cd ~/.vim/bundle/YouCompleteMe ./install.py --clang-completer
Compiling YCM without semantic support for C-family languages:
cd ~/.vim/bundle/YouCompleteMe ./install.py
Also, I would give you the tip to use vim-plug for handling plugins.

UltiSnips requires py >= 2.6 or any py3

I'm trying to install UltiSnips in different way but the same message appears each time when I launch vim.
Python 2.7 is installed but it seems that vim has been installed before the 2.7 version.
I tryed to reinstall vim using this link:
$ sudo apt-get install mercurial libssl-dev
$ sudo apt-get build-dep vim
$ hg clone http://hg.debian.org/hg/pkg-vim/vim
$ cd vim
$ hg checkout unstable
$ debian/rules update-orig
$ dpkg-buildpackage -i -I
$ cd ..
But the same problem remains.
Thanks
You don't provide much information to help. You can check whether your Vim has Python via :py print "yes". For the Python version, check the :version output. It will contain something like -lpython2.7.
When you compile Vim yourself, you need to enable the Python integration by passing ./configure --enable-pythoninterp.
I had the same problem with NeoVim on Ubuntu. Running :CheckHealth pointed me into the right direction. Creating the following softlink solved the problem for me:
sudo ln -s /usr/bin/python /usr/local/bin/python
Maybe obvious to most, but not to me was the fact that the neovim module had to be installed. On ubuntu, installing it using pip did the trick for me:
sudo pip3 install neovim
To install the module for python 3, I suppose pip3 has to exchanged for pip for python 2.
Download the source code from http://www.vim.org/.
Then
cd vim
make clean
./configure --prefix=/opt/local --with-features=huge --enable-pythoninterp=yes --enable-multibyte --with-vim-name=vim --with-python-config-dir=/usr/lib/python2.7/config-x86_64-linux-gnu
make
sudo make install
I had the same problem after installing UltiSnips, my simple solution was to type inside vim :version where python3 wasn't install. I solve this installing vim-gtk3, try sudo apt install vim-gtk3 after installing gtk3 the message disapper and my vim launches normally ;)

"spawn.h not found" while installing octopress on Cygwin

I have been trying to install octopress on cygwin. I have googled but no avail. I hope that someone can suggest a hack (no matter how complicated) to resolve this.
I followed the octopress installation instructions. Everything went smoothly till the bundle install stage. When I reached that point, the installation quits with the error telling that it couldn't find spawn.h.
I searched and apparently spawn.h doesn't come in any of the cygwin libraries. I installed all the c++ libraries I could from cygwin setup but that did not help.
Can you please help resolve this?
I think the gem that fails in this process is posix-spawn. For this, you could install the gem locally:
$ gem install rake-compiler -v 0.7.6
$ git clone git://github.com/rtomayko/posix-spawn.git
$ cd posix-spawn
$ rake gem
$ cd pkg/posix-spawn-0.3.6
$ gem install --local posix-spawn-0.3.6.gem
The explanation (from an article I found):
There is a bug in the version of posix-spawn in the gem repositories however that makes installing via gem impossible on Cygwin
After this, try bundle install again, it should be successful.
Here's a related issue on the GitHub project
UPDATE: I recently installed scoop a command-line installer for Windows, a pretty easy setup. I installed Ruby, bundler and octopress without breaking a sweat. You should give it a try.

Resources