threads / discuss / 22866

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

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

## tl;dr

6 messages between Mar 1, 2010 and Mar 1, 2010.

replies: 5people: 5as markdown or json

Oliver Kullmann· Mar 1, 2010, 14:40 UTC · lore
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· Mar 1, 2010, 15:15 UTC · re: Oliver Kullmann · lore

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

Hi,

On Mon, Mar 1, 2010 at 10:40 PM, Oliver Kullmann <O.Kullmann@swansea.ac.uk> wrote:

Show 7 quoted lines
> 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· Mar 1, 2010, 15:24 UTC · re: Tay Ray Chuan · lore

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

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
Julian Phillips· Mar 1, 2010, 18:21 UTC · re: Sverre Rabbelier · lore

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

On Mon, 1 Mar 2010 16:24:30 +0100, Sverre Rabbelier <srabbelier@gmail.com> wrote:

Show 6 quoted lines
> 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
Show 16 quoted lines
> 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· Mar 1, 2010, 18:32 UTC · re: Julian Phillips · lore

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

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
Todd Zullinger· Mar 1, 2010, 16:15 UTC · re: Oliver Kullmann · lore

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

Oliver Kullmann wrote:
Show 17 quoted lines
> 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

← back to recent threads