xuhdev / vim-latex-live-preview

A Vim Plugin for Lively Previewing LaTeX PDF Output
https://www.topbug.net/blog/2013/06/13/live-preview-of-latex-in-vim/
GNU General Public License v3.0
832 stars 73 forks source link

python/dyn instead of python #24

Closed giper45 closed 6 years ago

giper45 commented 7 years ago

Hello, in my default vim installed Mac Version there's the following python support:

 +python/dyn
-python3 

It seems that there is dynamic python library support, but when I run with enabled plugin vim error still happens:

vim-live-preview: Python initialization failed.

Is there any way to use dynamic python without compiling vim for the static python library ? Thanks in advance!

xuhdev commented 7 years ago

The plugin only calls has('python') to see whether python APIs are accessible. You can try the following and see the output:

 :echo has('python')
giper45 commented 7 years ago

It gives 1... but the error appears anyway...strange doesn't?

ranguli commented 7 years ago

@giper45 Was this ever resolved?

giper45 commented 7 years ago

Hi @ranguli unfortunately I wasn't able to use latex preview with python/dyn , even by editing the plugin and by supporting the python/dyn library it didn't work. I don't know if it's a Mac problem, anyway a solution could be to download vim source code and compile it by enabling the python support and by replacing the native mac vim with the compiled vim. I didn't try this, and I'm using a mix of texshop (mac native latex editor) to update the pdf preview with ctrl+R and mac native vim to edit latex files more quickly. If you try to compile vim let me now if the plugin works!

ranguli commented 7 years ago

@giper45 My solution (documented in issue #12 ) is the same as yours, I had to re-compile Vim with python3 support in order to remove python/dyn and change the calls to python to python3 in the code in order for it to work. Based on this I think it's safe to assume that there's no support python/dyn right now. I'll make a pull request on the README and add it as a known issue.

badouralix commented 7 years ago

Fun fact: here is my working config:

VIM - Vi IMproved 8.0 (2016 Sep 12, compiled Jun  8 2017 20:53:45)
Included patches: 1-628
Compiled by Arch Linux
Huge version without GUI.  Features included (+) or not (-):
+python/dyn      +python3/dyn

So, I'm not totally sure it is entirely related to +python vs +python/dyn

ranguli commented 7 years ago

@badouralix Funky. So both of your Vim installations support +python/dyn, the only differences in your environments being macOS vs Arch and consequently macOS's supplied version of Vim vs a compiled one.

But if they both support +python/dyn, that shouldn't matter.. right? I might need to remove this as a known issue depending on what we find out.

stale[bot] commented 7 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed after 30 days if no further activity occurs, but feel free to re-open a closed issue if needed. Thanks for contributing to vim-llp!