Giter Site home page Giter Site logo

Install process on Ubuntu about lunarvim HOT 18 CLOSED

lunarvim avatar lunarvim commented on July 22, 2024
Install process on Ubuntu

from lunarvim.

Comments (18)

jtfogarty avatar jtfogarty commented on July 22, 2024

health#vimtex#check

vimtex

  • OK: Vim version should have full support!
  • WARNING: bibtex is not executable, so bibtex completions are disabled.
  • OK: General viewer should work properly!
  • ERROR: |g:vimtex_compiler_method| (latexmk) is not executable!

health#coc#check

  • OK: Environment check passed
    Failed to load python3 host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages.
  • OK: Javascript bundle found
  • OK: Service started

health#floaterm#check

  • OK: Terminal feature is OK
  • OK: Floating window feature is OK
  • ERROR: nvr executable is not found, run pip install neovim-remote to install

health#nvim#check

Configuration

  • OK: no issues found

Performance

  • OK: Build type: RelWithDebInfo

Remote Plugins

  • OK: Up to date

terminal

  • INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
  • INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~

health#provider#check

Clipboard (optional)

  • WARNING: No clipboard tool found. Clipboard registers ("+ and "*) will not work.
    • ADVICE:
      • :help |clipboard|

Python 2 provider (optional)

  • INFO: g:python_host_prog is not set. Searching for python2 in the environment.
  • INFO: Executable: /usr/bin/python2
  • INFO: Python version: 2.7.17
  • INFO: pynvim version: 0.4.1
  • OK: Latest pynvim is installed.

Python 3 provider (optional)

  • INFO: Using: g:python3_host_prog = "/home/nvim/.miniconda/envs/neovim/bin/python3.8"
  • ERROR: "/home/nvim/.miniconda/envs/neovim/bin/python3.8" was not found.
  • INFO: Executable: Not found
  • ERROR: Detected pip upgrade failure: Python executable can import "pynvim" but not "neovim": /home/nvim/.miniconda/envs/neovim/bin/python3.8
    • ADVICE:
      • Use that Python version to reinstall "pynvim" and optionally "neovim".
        pip3 uninstall pynvim neovim
        pip3 install pynvim
        pip3 install neovim # only if needed by third-party software

Ruby provider (optional)

  • OK: Environment check passed
    Failed to load python3 host. You can try to see what happened by starting nvim with $NVIM_PYTHON_LOG_FILE set and opening the generated log file. Also, the host stderr is available in messages.
  • OK: Javascript bundle found
  • OK: Service started

health#floaterm#check

  • OK: Terminal feature is OK
  • OK: Floating window feature is OK
  • ERROR: nvr executable is not found, run pip install neovim-remote to install

health#nvim#check

Configuration

  • OK: no issues found

Performance

  • OK: Build type: RelWithDebInfo

Remote Plugins

  • OK: Up to date

terminal

  • INFO: key_backspace (kbs) terminfo entry: key_backspace=\177
  • INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~

health#provider#check

Clipboard (optional)

  • WARNING: No clipboard tool found. Clipboard registers ("+ and "*) will not work.
    • ADVICE:
      • :help |clipboard|

Python 2 provider (optional)

  • INFO: g:python_host_prog is not set. Searching for python2 in the environment.
  • INFO: Executable: /usr/bin/python2
  • INFO: Python version: 2.7.17
  • INFO: pynvim version: 0.4.1
  • OK: Latest pynvim is installed.

Python 3 provider (optional)

  • INFO: Using: g:python3_host_prog = "/home/nvim/.miniconda/envs/neovim/bin/python3.8"
  • ERROR: "/home/nvim/.miniconda/envs/neovim/bin/python3.8" was not found.
  • INFO: Executable: Not found
  • ERROR: Detected pip upgrade failure: Python executable can import "pynvim" but not "neovim": /home/nvim/.miniconda/envs/neovim/bin/python3.8
    • ADVICE:
      • Use that Python version to reinstall "pynvim" and optionally "neovim".
        pip3 uninstall pynvim neovim
        pip3 install pynvim
        pip3 install neovim # only if needed by third-party software

Ruby provider (optional)

  • WARNING: ruby and gem must be in $PATH.
    • ADVICE:
      • Install Ruby and verify that ruby and gem commands work.

Node.js provider (optional)

  • INFO: Node.js: v12.16.2
  • WARNING: Missing "neovim" npm (or yarn) package.
    • ADVICE:
      • Run in shell: npm install -g neovim
      • Run in shell (if you use yarn): yarn global add neovim

from lunarvim.

jtfogarty avatar jtfogarty commented on July 22, 2024

I can't get ranger to work
the floating coc-explorer worked one time.
none of the "leader" commands seem to work.

from lunarvim.

ChristianChiarulli avatar ChristianChiarulli commented on July 22, 2024

Well a lot of this is still pretty Alpha so bare with me.

  • Your coc healthcheck is failing so thats issue number one

  • If by the leader commands you mean vim-which-key I haven't set them up in this repo yet. So stay tuned for that video.

  • you have this path set 'Using: g:python3_host_prog = "/home/nvim/.miniconda/envs/neovim/bin/python3.8"' That's my path so I know that can't be right go under general directory remove the paths.vim file. I'll update this soon.
    After removing paths.vim make sure to pip3 install pynvim

  • Try some of these things and see if it helps if not post diagnostics again

from lunarvim.

jtfogarty avatar jtfogarty commented on July 22, 2024

Hey Chris, No worries. Just want to give feed back and help document. Is python 3.8 required? I missed that detail. Is miniconda required?

I'll wait on the leader commands

Thanks! Great work!

from lunarvim.

ChristianChiarulli avatar ChristianChiarulli commented on July 22, 2024

@jtfogarty while python3.8 is not required, I recommend installing pynvim for python3 with:

pip3 install pynvim

This should improve some of the diagnostics for CoC.

Also (and this is the important part) by default Neovim looks for your default python binary, how do you know which one that is just enter:

which python

which python3 # if you're on an older version of Ubuntu, I think FocalFlossa has default python as python3

Now you could also force Neovim to look at another Python binary you have installed with:

let g:python3_host_prog = expand("<path to python with pynvim installed>")
let g:python3_host_prog = expand("~/.miniconda/envs/neovim/bin/python3.8") " <- example

I use Miniconda only because I do some datascience stuff and I find having conda installed very useful for things like cudatoolkit and cuDNN. However you do not need miniconda, you can use any python virtual envioronment manager such as: virtualenv, pyenv etc..

The reason I install pynvim in a virtual environment and point it there is because I don't like installing things on my system version of python.

Another thing would be to make sure to install a clipboard tool for copy paste something like xsel.

Thanks for the feedback, keep it coming!

I want to clear up this process for as many people as possible.

from lunarvim.

ChristianChiarulli avatar ChristianChiarulli commented on July 22, 2024

Also for coc-explorer try this:

:CocInstall coc-explorer

from lunarvim.

jtfogarty avatar jtfogarty commented on July 22, 2024
health#vimtex#check
========================================================================
## vimtex
  - OK: Vim version should have full support!
  - WARNING: bibtex is not executable, so bibtex completions are disabled.
  - OK: General viewer should work properly!
  - ERROR: |g:vimtex_compiler_method| (`latexmk`) is not executable!

health#coc#check
========================================================================
  - OK: Environment check passed

  - OK: Javascript bundle found
  - OK: Service started

health#floaterm#check
========================================================================
  - OK: Terminal feature is OK
  - OK: Floating window feature is OK
  - ERROR: nvr executable is not found, run `pip install neovim-remote` to install

health#nvim#check
========================================================================
## Configuration
  - OK: no issues found

## Performance
  - OK: Build type: RelWithDebInfo

## Remote Plugins
  - OK: Up to date

## terminal
  - INFO: key_backspace (kbs) terminfo entry: key_backspace=^H
  - INFO: key_dc (kdch1) terminfo entry: key_dc=\E[3~

health#provider#check
========================================================================
## Clipboard (optional)
  - WARNING: No clipboard tool found. Clipboard registers (`"+` and `"*`) will not work.
    - ADVICE:
      - :help |clipboard|

## Python 2 provider (optional)
  - INFO: `g:python_host_prog` is not set.  Searching for python2 in the environment.
  - INFO: Executable: /usr/bin/python2
  - INFO: Python version: 2.7.17
  - INFO: pynvim version: 0.2.0 (outdated; from /usr/lib/python2.7/dist-packages/neovim)
  - WARNING: Latest pynvim is NOT installed: 0.4.1

## Python 3 provider (optional)
  - INFO: Using: g:python3_host_prog = "/home/jeff/.miniconda/envs/neovim/bin/python3.8"
  - INFO: Executable: /home/jeff/.miniconda/envs/neovim/bin/python3.8
  - INFO: Python version: 3.8.2
  - INFO: pynvim version: 0.4.1
  - OK: Latest pynvim is installed.

## Ruby provider (optional)
  - WARNING: `ruby` and `gem` must be in $PATH.
    - ADVICE:
      - Install Ruby and verify that `ruby` and `gem` commands work.

## Node.js provider (optional)
  - INFO: Node.js: v12.16.2
  - WARNING: Missing "neovim" npm (or yarn) package.
    - ADVICE:
      - Run in shell: npm install -g neovim
      - Run in shell (if you use yarn): yarn global add neovim

from lunarvim.

jtfogarty avatar jtfogarty commented on July 22, 2024

Latest install steps


  1. sudo useradd -m -s /bin/bash neovim

  2. sudo su - neovim

  3. wget https://github.com/neovim/neovim/releases/download/v0.4.3/nvim-linux64.tar.gz

    • tar -xzvf nvim-linux64.tar.gz
    • rm nvim-linux64.tar.gz
  4. wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh

    • chmod +x Miniconda3-latest-Linux-x86_64.sh
    • ./Miniconda3-latest-Linux-x86_64.sh
      • installing in ~/.miniconda
    • rm Miniconda3-latest-Linux-x86_64.sh
  5. git clone https://github.com/ChristianChiarulli/nvim.git ~/.config/nvim

  6. nano .profile

    • alias vi='~/nvim-linux64/bin/nvim'
  7. source .profile

  8. conda create -n neovim python=3.8

    • conda activate neovim
    • pip install --no-cache-dir --upgrade --force-reinstall pynvim
    • pip install --no-cache-dir --upgrade --force-reinstall neovim-remote
  9. execute vi

    • the first time neovim starts, plugins will be downloaded.
    • after downloads complete, execute :CocInstall coc-explorer

from lunarvim.

ChristianChiarulli avatar ChristianChiarulli commented on July 22, 2024

@jtfogarty Thank you! When I get a chance I'll add this to the wiki.

from lunarvim.

jtfogarty avatar jtfogarty commented on July 22, 2024

@ChristianChiarulli
I pushed my config to https://github.com/jtfogarty/nvim

The latest install process is here
https://gist.github.com/jtfogarty/3ac5ca11b868a3b992340d18d1f1632c

I have to do one of the below, otherwise chechhealth can not find nvr;

  • I have to add /home/nvim/miniconda3/bin to the $PATH
  • or I have to activate the nvim python environment

I'm seeing this behavior on both OS X and Linux

Is this correct?

from lunarvim.

ChristianChiarulli avatar ChristianChiarulli commented on July 22, 2024

@jtfogarty

This file: https://github.com/jtfogarty/nvim/blob/master/general/paths.vim

needs to point to the python version you installed pynvim and nvr on. That is really all it should take. I'll try to think more on it, but that's how it should work.

Can it find pynvim without adding miniconda to $PATH or activating the environment?

from lunarvim.

jtfogarty avatar jtfogarty commented on July 22, 2024

@ChristianChiarulli
without the $PATH variable set, it can find pynvim but it can't find nvr

I've also seeing that if I'm editing a file and I execute :w the airline bar goes away.

from lunarvim.

ChristianChiarulli avatar ChristianChiarulli commented on July 22, 2024

Try changing python3.8 to python at the end of the miniconda path

from lunarvim.

jtfogarty avatar jtfogarty commented on July 22, 2024

I changed

let g:python3_host_prog = expand("~/.miniconda/envs/neovim/bin/python3.8")

to

let g:python3_host_prog = expand("~/.miniconda/envs/neovim/bin/python")

but the same issue. without ~/.miniconda/envs/neovim/bin in the path the error is

nvr executable is not found

from lunarvim.

ChristianChiarulli avatar ChristianChiarulli commented on July 22, 2024

I'm going to install Ubuntu in a VM and try and troubleshoot this. What version of Ubuntu are you on?

from lunarvim.

jtfogarty avatar jtfogarty commented on July 22, 2024

18.04

from lunarvim.

ChristianChiarulli avatar ChristianChiarulli commented on July 22, 2024

Ok so I think I know what the issue is with nvr.

When you pip install neovim-remote nvr is installed in .local/bin

so you will need to add .local/bin to your PATH or move that binary to somewhere like /usr/bin

The reason I never saw this error is because I already had them in my path
This is also true for ueberzug for image previews

so your python host is working just fine its just that the binaries were hidden from us.

try adding the following to your bashrc or zshrc:

export PATH=/home/$USER/.local/bin:$PATH

from lunarvim.

smikeblog avatar smikeblog commented on July 22, 2024

I can't get ranger to work

The same problem with MXLinux.
How I solved:
NOTE I used to try nvim appimage and compiled one - Both are working.
For appimage 'cause it is easier:
https://github.com/neovim/neovim/wiki/Installing-Neovim

   curl -LO https://github.com/neovim/neovim/releases/download/nightly/nvim.appimage
   chmod u+x nvim.appimage
sudo mv nvim.appimage /opt/
sudo ln -sf /opt/nvim.appimage /usr/local/bin/nvim 

check if /usr/local/bin is in your PATH - usually it is by default
That's it with current version of neovim (0.5 ...)
For ranger to work in neovim:

  • removed ranger - sudo apt remove ranger
  • install dependencies according to https://github.com/ranger/ranger
  • install ranger with pip3 (I installed python3 only - python2 is disabled in nvim)
    sudo pip3 install ranger-fm

-start and try ...

P.S. If you don't need image preview you can use lf which is faster with plugin https://github.com/ptzz/lf.vim or
this one https://github.com/voldikss/vim-floaterm#use-as-a-ranger-plugin

from lunarvim.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.