From dd3b5db720f607d24a899f817de81bb05f7d2602 Mon Sep 17 00:00:00 2001 From: JensDiemer Date: Wed, 8 Oct 2014 22:07:42 +0200 Subject: [PATCH] Add a info, if pip not installed: See also: https://github.com/pypa/virtualenv/issues/656 --- bootstrap/source-pylucid-boot.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bootstrap/source-pylucid-boot.py b/bootstrap/source-pylucid-boot.py index de830c80d..c849ae188 100644 --- a/bootstrap/source-pylucid-boot.py +++ b/bootstrap/source-pylucid-boot.py @@ -151,6 +151,18 @@ def adjust_options(options, args): print "Create PyLucid environment in:", c.colorize(home_dir, foreground="blue", opts=("bold",)) print + # Check if pip and setuptools are available. See also: + # https://github.com/pypa/packaging-problems/issues/55 + try: + import pip, setuptools + except ImportError as err: + sys.stderr.write("ERROR: You must install 'pip' first, before execute this bootstrap script!\n") + sys.stderr.write("e.g.:\n") + sys.stderr.write(" ~$ wget https://bootstrap.pypa.io/get-pip.py -O - | python - --user\n") + sys.stderr.write("See also:\n") + sys.stderr.write(" https://pip.readthedocs.org/en/latest/installing.html\n") + sys.stderr.write("\n(Origin error was: %s)\n" % err) + sys.exit(-1) p = SysPath()