Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>Python 2.7.9+ and 3.4+</h2> <p>Good news! <a href="https://docs.python.org/3/whatsnew/3.4.html" rel="noreferrer">Python 3.4</a> (released March 2014) and <a href="https://docs.python.org/2/whatsnew/2.7.html#pep-477-backport-ensurepip-pep-453-to-python-2-7" rel="noreferrer">Python 2.7.9</a> (released December 2014) ship with Pip. This is the best feature of any Python release. It makes the community's wealth of libraries accessible to everyone. Newbies are no longer excluded from using community libraries by the prohibitive difficulty of setup. In shipping with a package manager, Python joins <a href="http://en.wikipedia.org/wiki/Ruby_%28programming_language%29" rel="noreferrer">Ruby</a>, <a href="http://en.wikipedia.org/wiki/Node.js" rel="noreferrer">Node.js</a>, <a href="http://en.wikipedia.org/wiki/Haskell_%28programming_language%29" rel="noreferrer">Haskell</a>, <a href="http://en.wikipedia.org/wiki/Perl" rel="noreferrer">Perl</a>, <a href="http://en.wikipedia.org/wiki/Go_%28programming_language%29" rel="noreferrer">Go</a>--almost every other contemporary language with a majority open-source community. Thank you Python.</p> <p>Of course, that doesn't mean Python packaging is problem solved. The experience remains frustrating. I discuss this <a href="https://stackoverflow.com/questions/2436731/does-python-have-a-package-module-management-system/13445719#13445719">in Stack Overflow question <em>Does Python have a package/module management system?</em></a>.</p> <p>And, alas for everyone using Python 2.7.8 or earlier (a sizable portion of the community). There's no plan to ship Pip to you. Manual instructions follow.</p> <h2>Python 2 ≤ 2.7.8 and Python 3 ≤ 3.3</h2> <p>Flying in the face of its <a href="http://www.python.org/about/" rel="noreferrer">'batteries included'</a> motto, Python ships without a package manager. To make matters worse, Pip was--until recently--ironically difficult to install.</p> <h3>Official instructions</h3> <p>Per <a href="https://pip.pypa.io/en/stable/installing/#do-i-need-to-install-pip" rel="noreferrer">https://pip.pypa.io/en/stable/installing/#do-i-need-to-install-pip</a>:</p> <p>Download <a href="https://bootstrap.pypa.io/get-pip.py" rel="noreferrer"><code>get-pip.py</code></a>, being careful to save it as a <code>.py</code> file rather than <code>.txt</code>. Then, run it from the command prompt:</p> <pre><code>python get-pip.py </code></pre> <p>You possibly need an administrator command prompt to do this. Follow <em><a href="http://technet.microsoft.com/en-us/library/cc947813(v=ws.10).aspx" rel="noreferrer">Start a Command Prompt as an Administrator</a></em> (Microsoft TechNet).</p> <p>This installs the pip package, which (in Windows) contains ...\Scripts\pip.exe that path must be in PATH environment variable to use pip from the command line (see the second part of 'Alternative Instructions' for adding it to your PATH,</p> <h3>Alternative instructions</h3> <p>The official documentation tells users to install Pip and each of its dependencies from source. That's tedious for the experienced and prohibitively difficult for newbies.</p> <p>For our sake, Christoph Gohlke prepares Windows installers (<code>.msi</code>) for popular Python packages. He builds installers for all Python versions, both 32 and 64 bit. You need to:</p> <ol> <li><a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#setuptools" rel="noreferrer">Install setuptools</a></li> <li><a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/#pip" rel="noreferrer">Install pip</a></li> </ol> <p>For me, this installed Pip at <code>C:\Python27\Scripts\pip.exe</code>. Find <code>pip.exe</code> on your computer, then add its folder (for example, <code>C:\Python27\Scripts</code>) to your path (Start / Edit environment variables). Now you should be able to run <code>pip</code> from the command line. Try installing a package:</p> <pre><code>pip install httpie </code></pre> <p>There you go (hopefully)! Solutions for common problems are given below:</p> <h3>Proxy problems</h3> <p>If you work in an office, you might be behind an HTTP proxy. If so, set the environment variables <a href="http://docs.python.org/2/library/urllib.html" rel="noreferrer"><code>http_proxy</code> and <code>https_proxy</code></a>. Most Python applications (and other free software) respect these. Example syntax:</p> <pre><code>http://proxy_url:port http://username:password@proxy_url:port </code></pre> <p>If you're really unlucky, your proxy might be a Microsoft <a href="https://en.wikipedia.org/wiki/NT_LAN_Manager" rel="noreferrer">NTLM</a> proxy. Free software can't cope. The only solution is to install a free software friendly proxy that forwards to the nasty proxy. <a href="http://cntlm.sourceforge.net/" rel="noreferrer">http://cntlm.sourceforge.net/</a></p> <h3>Unable to find vcvarsall.bat</h3> <p>Python modules can be partly written in C or C++. Pip tries to compile from source. If you don't have a C/C++ compiler installed and configured, you'll see this cryptic error message.</p> <blockquote> <p>Error: Unable to find vcvarsall.bat</p> </blockquote> <p>You can fix that by <a href="https://stackoverflow.com/questions/2817869/error-unable-to-find-vcvarsall-bat">installing a C++ compiler</a> such as <a href="http://en.wikipedia.org/wiki/MinGW" rel="noreferrer">MinGW</a> or <a href="http://en.wikipedia.org/wiki/Visual_C%2B%2B#32-bit_versions" rel="noreferrer">Visual C++</a>. Microsoft actually ships one specifically for use with Python. Or try <em><a href="http://aka.ms/vcpython27" rel="noreferrer">Microsoft Visual C++ Compiler for Python 2.7</a></em>.</p> <p>Often though it's easier to check <a href="http://www.lfd.uci.edu/~gohlke/pythonlibs/" rel="noreferrer">Christoph's site</a> for your package.</p>
    singulars
    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.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      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