Note that there are some explanatory texts on larger screens.

plurals
  1. POPip version limbo
    text
    copied!<p>I basically have the exact same situation as described in<br> <a href="https://stackoverflow.com/q/10055260/165673">Python 2.7 on System, PIP and Virtualenv still using 2.6 - How do I switch them to use 2.7</a></p> <p>That is, my mac is using Python 2.7 as default, while Pip is installing to 2.6</p> <p>I followed <a href="https://stackoverflow.com/a/10055615/165673">Ned Deily's answer</a> and installed easy_install with my default Python, and used that to install Pip. </p> <p><strong>Now I get:</strong></p> <pre class="lang-none prettyprint-override"><code>$ which easy_install /Library/Frameworks/Python.framework/Versions/2.7/bin/easy_install $ which pip /Library/Frameworks/Python.framework/Versions/2.7/bin/pip </code></pre> <p><strong>Alright, looking good. But, I also get this:</strong></p> <pre class="lang-none prettyprint-override"><code>$ pip --version pip 1.0.2 from /Library/Python/2.6/site-packages/pip-1.0.2-py2.6.egg (python 2.6) </code></pre> <p>and Pip is <em>still</em> installing to 2.6.</p> <p>What am I missing?</p> <hr> <p><strong>Update</strong>: </p> <p>Maybe this is a clue- I just ran the following:</p> <pre><code>$ ls -la /usr/bin/python* -rwxr-xr-x 2 root wheel 86000 May 4 2011 /usr/bin/python -rwxr-xr-x 5 root wheel 925 May 4 2011 /usr/bin/python-config lrwxr-xr-x 1 root wheel 75 May 4 2011 /usr/bin/python2.5 -&gt; ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5 lrwxr-xr-x 1 root wheel 82 May 4 2011 /usr/bin/python2.5-config -&gt; ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/python2.5-config lrwxr-xr-x 1 root wheel 75 May 4 2011 /usr/bin/python2.6 -&gt; ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6 lrwxr-xr-x 1 root wheel 82 May 4 2011 /usr/bin/python2.6-config -&gt; ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/python2.6-config -rwxr-xr-x 2 root wheel 86000 May 4 2011 /usr/bin/pythonw lrwxr-xr-x 1 root wheel 76 May 4 2011 /usr/bin/pythonw2.5 -&gt; ../../System/Library/Frameworks/Python.framework/Versions/2.5/bin/pythonw2.5 lrwxr-xr-x 1 root wheel 76 May 4 2011 /usr/bin/pythonw2.6 -&gt; ../../System/Library/Frameworks/Python.framework/Versions/2.6/bin/pythonw2.6 </code></pre> <p>and</p> <pre><code>$ ls -la /usr/local/bin/python* lrwxr-xr-x 1 ykessler wheel 68 Nov 14 2011 /usr/local/bin/python -&gt; ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python lrwxr-xr-x 1 ykessler wheel 71 Nov 14 2011 /usr/local/bin/python-32 -&gt; ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python-32 lrwxr-xr-x 1 ykessler wheel 75 Nov 14 2011 /usr/local/bin/python-config -&gt; ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python-config lrwxr-xr-x 1 ykessler wheel 71 Nov 14 2011 /usr/local/bin/python2.7 -&gt; ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7 lrwxr-xr-x 1 ykessler wheel 74 Nov 14 2011 /usr/local/bin/python2.7-32 -&gt; ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-32 lrwxr-xr-x 1 ykessler wheel 78 Nov 14 2011 /usr/local/bin/python2.7-config -&gt; ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/python2.7-config lrwxr-xr-x 1 ykessler wheel 69 Nov 14 2011 /usr/local/bin/pythonw -&gt; ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw lrwxr-xr-x 1 ykessler wheel 72 Nov 14 2011 /usr/local/bin/pythonw-32 -&gt; ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw-32 lrwxr-xr-x 1 ykessler wheel 72 Nov 14 2011 /usr/local/bin/pythonw2.7 -&gt; ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7 lrwxr-xr-x 1 ykessler wheel 75 Nov 14 2011 /usr/local/bin/pythonw2.7-32 -&gt; ../../../Library/Frameworks/Python.framework/Versions/2.7/bin/pythonw2.7-32 </code></pre> <p>So it looks like my user environment is pointing to 2.7, but root environment pointing to 2.6? How do I reconcile these two?</p> <hr> <p><strong>Update 2:</strong> </p> <p>OK, just to turn the screw a little more: </p> <pre><code>$ sudo pip --version pip 1.2.1 from /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/pip-1.2.1-py2.7.egg (python 2.7) $ pip --version pip 1.0.2 from /Library/Python/2.6/site-packages/pip-1.0.2-py2.6.egg (python 2.6) </code></pre> <p>so my root points to 2.6 but <code>sudo pip --version</code> points to pip 2.7, while my local user points to 2.7 but <code>pip --version</code> points to pip 2.6</p> <p>??? My brains starting to fry. </p> <p>Now I just did <code>sudo pip install {module}</code> and it installed correctly in 2.7, but I wish I knew what was going on...</p> <hr> <p><strong>Update 3: Answer to Ned's question:</strong></p> <pre><code>$ type pip pip is /Library/Frameworks/Python.framework/Versions/2.7/bin/pip $ echo $PATH /Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin $ which pip /Library/Frameworks/Python.framework/Versions/2.7/bin/pip $ ls -l $(which pip) -rwxr-xr-x 1 ykessler admin 358 Oct 3 15:30 /Library/Frameworks/Python.framework/Versions/2.7/bin/pip $ sudo bash bash-3.2# type pip pip is /Library/Frameworks/Python.framework/Versions/2.7/bin/pip bash-3.2# echo $PATH /Library/Frameworks/Python.framework/Versions/2.7/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/local/git/bin:/usr/X11/bin bash-3.2# ls -l $(which pip) -rwxr-xr-x 1 ykessler admin 358 Oct 3 15:30 /Library/Frameworks/Python.framework/Versions/2.7/bin/pip </code></pre>
 

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