# error when installing 1.7.0.1: "ImportError: No module named distutils.core"

6 messages from 2010-03-01 to 2010-03-01. Participants: Oliver Kullmann, Tay Ray Chuan, Sverre Rabbelier, Todd Zullinger, Julian Phillips.
Thread: https://gitlist.dev/t/22866

## Oliver Kullmann, 2010-03-01 14:40

Subject: error when installing 1.7.0.1: "ImportError: No module named distutils.core"
Message-ID: <20100301144000.GA17135@cs-wsok.swansea.ac.uk>
URL: https://gitlist.dev/e/20100301144000.GA17135%40cs-wsok.swansea.ac.uk

```
Hello,

I've installed 1.6.6.2, but now when
installing 1.7.0.1 (same machine) I get

make[3]: Leaving directory `/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/builds/Git/git-1.7.0.1/perl'
make[2]: Leaving directory `/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/builds/Git/git-1.7.0.1/perl'
make[2]: Entering directory `/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/builds/Git/git-1.7.0.1/git_remote_helpers'
Traceback (most recent call last):
  File "setup.py", line 5, in ?
    from distutils.core import setup
ImportError: No module named distutils.core


I'm using

make configure
sh ./configure --prefix=InstallDir
make all

I've checked the README and INSTALL file, but I don't see that there are new
requirements? (That is not regarding doc.)

Oliver

```

## Tay Ray Chuan, 2010-03-01 15:15

Subject: Re: error when installing 1.7.0.1: "ImportError: No module named distutils.core"
Message-ID: <be6fef0d1003010715l31d7b49bs36ee69685e1684e8@mail.gmail.com>
URL: https://gitlist.dev/e/be6fef0d1003010715l31d7b49bs36ee69685e1684e8%40mail.gmail.com
In-Reply-To: <20100301144000.GA17135@cs-wsok.swansea.ac.uk>

```
Hi,

On Mon, Mar 1, 2010 at 10:40 PM, Oliver Kullmann
<O.Kullmann@swansea.ac.uk> wrote:
> make[3]: Leaving directory `/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/builds/Git/git-1.7.0.1/perl'
> make[2]: Leaving directory `/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/builds/Git/git-1.7.0.1/perl'
> make[2]: Entering directory `/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/builds/Git/git-1.7.0.1/git_remote_helpers'
> Traceback (most recent call last):
>  File "setup.py", line 5, in ?
>    from distutils.core import setup
> ImportError: No module named distutils.core

(adding Sverre to the Cc list, perhaps he has something to add)

you need to install setuptools from python, or pass NO_PYTHON to make/configure.

> I've checked the README and INSTALL file, but I don't see that there are new
> requirements? (That is not regarding doc.)

I guess we should improve on this.

-- 
Cheers,
Ray Chuan

```

## Sverre Rabbelier, 2010-03-01 15:24

Subject: Re: error when installing 1.7.0.1: "ImportError: No module named distutils.core"
Message-ID: <fabb9a1e1003010724g7c4d2517v1515b846e288713a@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e1003010724g7c4d2517v1515b846e288713a%40mail.gmail.com
In-Reply-To: <be6fef0d1003010715l31d7b49bs36ee69685e1684e8@mail.gmail.com>

```
Heya,

On Mon, Mar 1, 2010 at 16:15, Tay Ray Chuan <rctay89@gmail.com> wrote:
> (adding Sverre to the Cc list, perhaps he has something to add)

This is Johan's code, but IIRC setup.py is pretty much generic setuptools code.

> you need to install setuptools from python, or pass NO_PYTHON to make/configure.

Correct.

>> I've checked the README and INSTALL file, but I don't see that there are new
>> requirements? (That is not regarding doc.)
>
> I guess we should improve on this.

Aye, at the very least we need to document this requirement, but it
would probably be even better to test for the existence of setuptools
and give a useful error message if it's not found?

-- 
Cheers,

Sverre Rabbelier

```

## Todd Zullinger, 2010-03-01 16:15

Subject: Re: error when installing 1.7.0.1: "ImportError: No module named distutils.core"
Message-ID: <20100301161541.GM29188@inocybe.localdomain>
URL: https://gitlist.dev/e/20100301161541.GM29188%40inocybe.localdomain
In-Reply-To: <20100301144000.GA17135@cs-wsok.swansea.ac.uk>

```
Oliver Kullmann wrote:
> I've installed 1.6.6.2, but now when
> installing 1.7.0.1 (same machine) I get
>
> make[3]: Leaving directory `/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/builds/Git/git-1.7.0.1/perl'
> make[2]: Leaving directory `/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/builds/Git/git-1.7.0.1/perl'
> make[2]: Entering directory `/home/csoliver/SAT-Algorithmen/OKplatform/ExternalSources/builds/Git/git-1.7.0.1/git_remote_helpers'
> Traceback (most recent call last):
>   File "setup.py", line 5, in ?
>     from distutils.core import setup
> ImportError: No module named distutils.core
>
>
> I'm using
>
> make configure
> sh ./configure --prefix=InstallDir
> make all

If you have no need for the git_remote_helpers (and unless you are
working on adding a git remote helper in python, I don't think you
do), you can pass --without-python to configure.  I think that's the
right way using configure, I use make directly and pass NO_PYTHON = 1
for the time being.

-- 
Todd        OpenPGP -> KeyID: 0xBEAF0CE3 | URL: www.pobox.com/~tmz/pgp
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
There are no differences but differences of degree between different
degrees of difference and no difference.
    -- William James, under nitrous oxide; 1882


```

## Julian Phillips, 2010-03-01 18:21

Subject: Re: error when installing 1.7.0.1: "ImportError: No module named distutils.core"
Message-ID: <bb49d06f73fe23be76e16089ce8b251c@212.159.54.234>
URL: https://gitlist.dev/e/bb49d06f73fe23be76e16089ce8b251c%40212.159.54.234
In-Reply-To: <fabb9a1e1003010724g7c4d2517v1515b846e288713a@mail.gmail.com>

```
On Mon, 1 Mar 2010 16:24:30 +0100, Sverre Rabbelier <srabbelier@gmail.com>
wrote:
> Heya,
> 
> On Mon, Mar 1, 2010 at 16:15, Tay Ray Chuan <rctay89@gmail.com> wrote:
>> (adding Sverre to the Cc list, perhaps he has something to add)
> 
> This is Johan's code, but IIRC setup.py is pretty much generic
setuptools
> code.
> 
>> you need to install setuptools from python, or pass NO_PYTHON to
>> make/configure.
> 
> Correct.
> 
>>> I've checked the README and INSTALL file, but I don't see that there
>>> are new
>>> requirements? (That is not regarding doc.)
>>
>> I guess we should improve on this.
> 
> Aye, at the very least we need to document this requirement, but it
> would probably be even better to test for the existence of setuptools
> and give a useful error message if it's not found?

Something like the following in the Makefile perhaps?

  Python_distutils = $(shell sh -c "$(PYTHON_PATH) -c 'import distutils'
2>/dev/null || echo not")

  ifeq ($(Python_distutils),not)
          $(warning "Disabling Python: please install setuptools to
enable")
          NO_PYTHON=SadlyYes
  endif

-- 
Julian

```

## Sverre Rabbelier, 2010-03-01 18:32

Subject: Re: error when installing 1.7.0.1: "ImportError: No module named distutils.core"
Message-ID: <fabb9a1e1003011032r61577a2cr21a1fa61154c2d76@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e1003011032r61577a2cr21a1fa61154c2d76%40mail.gmail.com
In-Reply-To: <bb49d06f73fe23be76e16089ce8b251c@212.159.54.234>

```
Heya,

On Mon, Mar 1, 2010 at 19:21, Julian Phillips <julian@quantumfyre.co.uk> wrote:
> Something like the following in the Makefile perhaps?

Indeed, I reckon there's some style issues there, but something along
those lines yes :).

-- 
Cheers,

Sverre Rabbelier

```
