Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: Oscar Benjamin Newsgroups: comp.lang.python Subject: Re: Python's import situation has driven me to the brink of imsanity Date: Wed, 10 Feb 2016 00:31:52 +0000 Lines: 15 Message-ID: References: <51b52cf3-0b0a-451e-a232-d9a671f7cd20@googlegroups.com> <14095c33-b5d4-419f-aaf4-e6f293d0cbf9@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de nzQJqh2V4JXs688bTV3ZhAr3cyJ1NNpOuNan7sFwK9lg== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'subject:Python': 0.05; 'distutils': 0.05; 'error:': 0.05; 'setup.py': 0.07; 'cc:addr :python-list': 0.09; 'command.': 0.09; 'invocation': 0.09; 'python': 0.10; 'importing': 0.15; '2016': 0.16; 'cc:name:python list': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'setuptools': 0.16; 'setuptools"': 0.16; 'setuptools.': 0.16; 'subject:import': 0.16; 'wrote:': 0.16; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'work,': 0.21; 'import': 0.24; 'header :In-Reply-To:1': 0.24; 'script': 0.25; 'install': 0.25; "doesn't": 0.26; 'command': 0.26; 'message-id:@mail.gmail.com': 0.27; 'work.': 0.30; 'recommended': 0.34; 'running': 0.34; 'gives': 0.35; 'received:google.com': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'subject:: ': 0.37; 'received:209': 0.38; 'does': 0.39; 'subject:the': 0.39; 'rather': 0.39; 'your': 0.60; 'oscar': 0.84; 'pip': 0.84; 'presumably': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=mSdJGdpzwFiIqPRvEpyNegxTUiL8WKiz3e3yIMwxZq8=; b=boDo+VLyF+y2SDkYdfrvQeejnFOle3KYgx4w3z3Ad4PBIOl4xDFvld5BY/EpHamv/I eFuZu6FO1JXFRK13bb3fF3hyEpv8W2v0sKY64N3r4mmwIIBa1DvSNKEwFWYnT3kCYDxx w3oAaEtNM1o/bmEpDjNDzYMhcDT1soGjf3K4lZyyqdvfuiuL68ZuYNQayAwy0t3ow3g1 ESmwJqtSL1XUz8od8C+aaYzRcIc2d96mLyJEbjOUBJQDMO8H9vYFGwb1BX2bp/kXXVVX c1AS7d0dUyqOnit5bNoezw4HIIPOEdEnInLna8qN+jQZg5Z4WLHeB1MiyYC+8j1czRop EhrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=mSdJGdpzwFiIqPRvEpyNegxTUiL8WKiz3e3yIMwxZq8=; b=RPCtPyIpWKVRr3gybSmqmvx0omMGzAPE/7P0JUs8eBDHCGS8dLDQusmwtNnTh20eQA MjRwqrhP/+axcdQW2m09GDttuKT5cZaSW5Qui35jOhy7Wq8OJXUe69Qh4pFvfnOdqRgk L8CcOmBmgycOdD/TWBwHl0KrDNUEqIM8Cofz6xAT94xSW21aeZDeWM2j+b7zOch78kBP 2Ml98ZrNnM+nvNKRfhnIxJwBbh29Vanvfkz6I8uUJbpqFDDe4JAJYC5mFcnoquMrTqAp 1N5Nku2fyeaPXXWEXeI9pOkbw72W5XYRAO6H8RRO4Ftb7sharOOQv3yE8n+NfKV3fmf3 G3Jw== X-Gm-Message-State: AG10YOSVS7lB443qFV/9lgdZuq8JbJ/gSI4Pb+za11LcWYiK5gkK1p7pXIYen0L/OZwyh++vlr6G6tPfCsIQyg== X-Received: by 10.25.21.90 with SMTP id l87mr14754963lfi.64.1455064331946; Tue, 09 Feb 2016 16:32:11 -0800 (PST) In-Reply-To: <14095c33-b5d4-419f-aaf4-e6f293d0cbf9@googlegroups.com> X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.21rc2 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:102739 On 8 February 2016 at 00:38, wrote: > Running python setup.py develop doesn't work, it gives me this error: error: invalid command 'develop' This is presumably because your setup.py script uses distutils rather than setuptools: distutils doesn't have the develop command. > Running pip install -e . does work. That's because pip "injects setuptools" so that when you import distutils in your setup.py your actually importing a monkey-patched setuptools. You may as well import setuptools in your setup.py but either way the recommended invocation is "pip install -e .". -- Oscar