Skip to content

Instantly share code, notes, and snippets.

(VE)[qwcode@qwcode tmp]$ pip install peppercorn==0.2
Collecting peppercorn==0.2
Downloading peppercorn-0.2.tar.gz
Installing collected packages: peppercorn
Running setup.py install for peppercorn
Successfully installed peppercorn-0.2
(VE)[qwcode@qwcode tmp]$ pip install deform
Collecting deform
Using cached deform-0.9.9.tar.gz
Collecting Chameleon>=2.5.1 (from deform)
(VE)[qwcode@qwcode tmp]$ pip --version
pip 6.1.1 from /tmp/VE/lib/python2.7/site-packages (python 2.7)
(VE)[qwcode@qwcode tmp]$ pip install -vv --no-clean peppercorn
Collecting peppercorn
Getting page https://pypi.python.org/simple/peppercorn/
1 location(s) to search for versions of peppercorn:
* https://pypi.python.org/simple/peppercorn/
Getting page https://pypi.python.org/simple/peppercorn/
Analyzing links from page https://pypi.python.org/simple/peppercorn/
Found link https://pypi.python.org/packages/source/p/peppercorn/peppercorn-0.1.tar.gz#md5=e130ffecc953a1f1ae5d1a25c10f85f3 (from https://pypi.python.org/simple/peppercorn/), version: 0.1
@qwcode
qwcode / gist:2822510
Created May 29, 2012 04:26
breakup pip pull request 511
break up https://github.com/pypa/pip/pull/511
part1: MERGED https://github.com/pypa/pip/pull/548
- system_site_packages option for reset_env
- pypi_server.PyPIProxy.setup() occur in a sitecustomize file (not pth file) to prevent pkg_resources.working_set corruption that corrupts the sys.path
part2: MERGED https://github.com/pypa/pip/pull/553
- migrate existing tests to new test_user_site.py module
part3: MERGED https://github.com/pypa/pip/pull/567
@qwcode
qwcode / gist:2993698
Created June 26, 2012 06:12
pip install options breakdown
option Right align Center align
This This This
column column column
will will will
be be be
left right center
aligned aligned aligned
@qwcode
qwcode / gist:3088149
Created July 11, 2012 05:14
non-recursive force upgrade

Upgrading a package, w/o upgrading dependencies that are already satisifed

suppose the following packages: a, b, c, d

with the following dependency relationships between their versioned distributions

  • a-1
  • b
@qwcode
qwcode / gist:3828683
Created October 3, 2012 18:07
"pip wheel"
Usage: pip wheel [OPTIONS] PACKAGE_NAMES...
Creates wheel archives from your requirements and place into ./wheels
(requires distribute>0.6.28 and wheel)
-w --wheel-dir <DIR> //alternative dir to place wheels into
--force-rebuild //rewrite existing wheels
--unpack-only <DIR> //unpack to dir, for manual building with "setup.py bdist_wheel"
-r, --requirement <FILENAME>
-f, --find-links <URL>
@qwcode
qwcode / gist:3828762
Created October 3, 2012 18:20
--package-cache
"--package-cache"
- a new "pip install" config option that offers name-based (i.e. not url-based) caching.
- the "--download-cache" option would stay as it is, and not be altered
- the package-cache dir would just contain packages (e.g. "nose-1.2.tar.gz", or lxml-2.5[..].whl), anything you've installed while using it.
- the package-cache would be turned off by default, since the user assumes a certain amount of risk/responsibility in using it (no hash checking)
- the package-cache (if turned on) would be checked prior to using the PackageFinder (which searches pypi and findlinks)
(if the req was "nose", any nose version in the package-cache would "win", unless --upgrade is specified)
- package-cache offers an alternative to this workflow:
- pip install -d DIR PACKAGES
Usage: pip COMMAND [OPTIONS]
Commands:
bundle Create pybundles (archives containing multiple packages)
freeze Output all currently installed packages (exact versions) to stdout
help Show available commands
install Install packages
search Search PyPI
show Output installed distributions (exact versions, files) to stdout
uninstall Uninstall packages
Synopsis:
pip install [options] <package> [<package> ...]
General Options:
-V, --version
show version and exit
virtualenv myVE
source myVE/bin/activate
cd myproject
pip -e .[testing] #installs project into myVE in develop mode with dependencies and the testing extras
pip install somepkg #install something else you want to try