Skip to content
This repository has been archived by the owner on Mar 12, 2019. It is now read-only.

neovim: Use system Python if possible #55

Closed
2 tasks done
tkossak opened this issue Jun 1, 2016 · 7 comments
Closed
2 tasks done

neovim: Use system Python if possible #55

tkossak opened this issue Jun 1, 2016 · 7 comments
Assignees

Comments

@tkossak
Copy link

tkossak commented Jun 1, 2016

  • Ran brew update and retried your prior step?
  • Ran brew doctor, fixed as many issues as possible and retried your prior step?

Actual behaviour:

I install neovim with brew install neovim/neovim/neovim and it also installs its own python in $HOME/.linuxbrew/bin/python clobbering system /usr/bin/python (because during brew installation PATH was updated with export PATH="$HOME/.linuxbrew/bin:$PATH"). Is there any way to install neovim without clobbering my system python?

$ which python
/home/kossak/.linuxbrew/bin/python

Expected behaviour

$ which python
/usr/bin/python

Steps to reproduce:

brew install neovim/neovim/neovim
which python

Don't know where the bug is so i also posted this on homebrew-neovim

My system specs:

System:    Kernel: 3.19.0-32-generic x86_64 (64 bit gcc: 4.8.2) Desktop: Cinnamon 2.8.8 (Gtk 2.24.23) dm: mdm
           Distro: Linux Mint 17.3 Rosa

Pythons (i moved brew as the last path in $PATH with export PATH="$PATH:$HOME/.linuxbrew/bin"):


$ echo $PATH
/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/home/kossak/.fzf/bin:/home/kossak/.dotfiles/bin:/home/kossak/.dotfiles.local/bin:/home/kossak/.linuxbrew/bin:/home/kossak/.dotfiles/bin:/home/kossak/.dotfiles.local/bin:/home/kossak/.linuxbrew/bin

$ which python python2 python3
/usr/bin/python
/usr/bin/python2
/usr/bin/python3

$ python -V; python2 -V; python3 -V;
Python 2.7.6
Python 2.7.6
Python 3.4.3

$ which pip pip2 pip3
/usr/local/bin/pip
/usr/local/bin/pip2
/usr/local/bin/pip3

$ pip -V; pip2 -V; pip3 -V;
pip 8.1.2 from /usr/local/lib/python3.4/dist-packages (python 3.4)
pip 1.5.4 from /usr/lib/python2.7/dist-packages (python 2.7)
pip 8.1.2 from /usr/local/lib/python3.4/dist-packages (python 3.4)

$ /home/kossak/.linuxbrew/bin/python -V
Python 2.7.11

I installed brew with ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"

@sjackman
Copy link
Member

sjackman commented Jun 1, 2016

As a workaround, try brew unlink python

@sjackman
Copy link
Member

sjackman commented Jun 1, 2016

neovim should use the system Python when it's available. I'll have to look into why it's installing the Linuxbrew python.

@sjackman sjackman changed the title installing through brew overwrites system python neovim: Use system Python if possible Jun 1, 2016
@sjackman
Copy link
Member

sjackman commented Jun 1, 2016

It should use your system Python so long as it is version 2.7.x. Please report

/usr/bin/python --version

@tkossak
Copy link
Author

tkossak commented Jun 1, 2016

Somehow it didn't use my Python 2.7.6:

$ /usr/bin/python --version
Python 2.7.6
$ /home/kossak/.linuxbrew/bin/python --version
Python 2.7.11

@sjackman
Copy link
Member

sjackman commented Jun 1, 2016

I'll see if I can reproduce that issue on my system. Does the workaround work for you?
brew unlink python

@tkossak
Copy link
Author

tkossak commented Jun 1, 2016

Thank you. I added some of my system info to first post.

@tkossak
Copy link
Author

tkossak commented Jun 1, 2016

Does the workaround work for you?
brew unlink python

Yes it works (even with linuxbrew path on the begining of $PATH)

@sjackman sjackman self-assigned this Jun 1, 2016
@ahundt ahundt mentioned this issue Jul 25, 2016
3 tasks
@stale stale bot added the stale label May 13, 2017
@stale stale bot closed this as completed May 20, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants