Note that there are some explanatory texts on larger screens.

plurals
  1. POvim compiles with wrong python version (and not working with needed version)
    primarykey
    data
    text
    <h3>In brief:</h3> <p>I have a problem with compiling vim with preferred python version.<br> When I use <code>--enable-pythoninterp</code> it compiles with system OSX python version.<br> When I use <code>--enable-pythoninterp=dynamic</code> I get an error in vim while trying <code>:py import sys</code></p> <h3>Here is what I was doing in more detail:</h3> <pre class="lang-none prettyprint-override"><code>% git clone https://github.com/b4winckler/macvim.git % cd macvim % ./configure --enable-pythoninterp \ --with-python-config-dir=/usr/local/lib/python2.7/config &lt;- this option has no affects on result ... checking for python... /usr/local/bin/python checking Python version... 2.7 checking Python is 1.4 or better... yep checking Python's install prefix... /usr/local checking Python's execution prefix... /usr/local checking Python's configuration directory... /usr/local/lib/python2.7/config ... % make ... ** BUILD SUCCEEDED ** % open src/MacVim/build/Release/MacVim.app </code></pre> <p>In the opened MacVim I type:</p> <pre><code>:py import sys; print (sys.version, sys.executable) ('2.6.1 (r261:67515, Jun 24 2010, 21:47:49) [GCC 4.2.1 (Apple Inc. build 5646)]', '/usr/bin/python') </code></pre> <p><strong>Why <code>2.6.1</code>?<br> Why <code>/usr/bin/python</code>?<br> My default python is 2.7! And it lives at <code>/usr/local/bin/python</code></strong><br> I was searching for solution all day. And I found it. It is <a href="http://marc-abramowitz.com/archives/2011/06/13/how-to-build-macvim-with-python-2-7/" rel="nofollow noreferrer">=dynamic</a> attribute (but this solution had not explanation). </p> <p>After that I tried to recompile vim with dynamic python: </p> <pre><code>% ./configure --enable-pythoninterp=dynamic ... output the same ... % make % open src/MacVim/build/Release/MacVim.app </code></pre> <p>In opened MacVim: </p> <pre><code>:py import sys </code></pre> <p><strong>And here comes an error:</strong> </p> <pre><code>E370: Could not load library libpython2.7.a E263: Sorry, this command is disabled, the Python library could not be loaded. </code></pre> <hr> <p>My OSX version is 10.6.8.<br> Default python version is 2.7. </p> <pre><code>% which python /usr/local/bin/python </code></pre> <p><strong>Can anybody explain how python is integrating into vim during the compilation?<br> And how to fix the error with libpython2.7.a?</strong></p> <hr> <p><strong>update</strong>: I no longer have the environment described at the question. So I couldn't test new answers. But remaining part of mankind will appreciate your help.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload