Error: Couldn't install: lxml 2.1.5 when install schooltool-1.3.0

Asked by missthom

Dear all,

When I install schooltool-1.3.0.tgz via readme.txt but one error appear, the description following:

$sudo make ---> ok
$ sudo make test ftest --> install requirement but error:
....................
error: Setup script exited with error: command 'gcc' failed with exit status 1
An error occured when trying to install lxml 2.1.5. Look above this message for any errors that were output by easy_install.
While:
  Installing package.
  Getting distribution for 'lxml==2.1.5'.
Error: Couldn't install: lxml 2.1.5
make: *** [bin/test] Error 1

$

I try to fix but not suscessful, Can you help me?

P/S: Tom Hoffman, can you help me, please?

Thanks all,

Revision history for this message
Tom Hoffman (tom-hoffman) said :
#1

Sorry, that README is a little out of date. Use: http://book.schooltool.org/htmlhelp/dev_sandbox.html

Revision history for this message
missthom (thompt) said :
#2

:( Dear Hoffman,

I do by http://book.schooltool.org/htmlhelp/dev_sandbox.html guide. But when I run :

~$ bzr co lp:schooltool schooltool

You have not informed bzr of your launchpad login. If you are attempting a
write operation and it fails, run "bzr launchpad-login YOUR_ID" and try again.

I try to run:

root@missthom-laptop:~/workspace/New-Version-Schooltool# bzr launchpad-login missthom
bzr: ERROR: The user name missthom is not registered on Launchpad.

root@missthom-laptop:~/workspace/New-Version-Schooltool# bzr launchpad-login thom43th.dhtl
bzr: ERROR: The user name thom43th.dhtl is not registered on Launchpad.
root@missthom-laptop:~/workspace/New-Version-Schooltool#

Because that error I ignore and edit buildout.conf and run next commands:

root@missthom-laptop:~/workspace/New-Version-Schooltool/schooltool# sudo make ubuntu-environment

Reading package lists... Done
Building dependency tree
Reading state information... Done
bzr is already the newest version.
build-essential is already the newest version.
python-all is already the newest version.
python-all-dev is already the newest version.
libc6-dev is already the newest version.
libicu-dev is already the newest version.
The following packages were automatically installed and are no longer required:
  libsane-dev libgphoto2-2-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Installation Complete: Next... Run 'make'.

root@missthom-laptop:~/workspace/New-Version-Schooltool/schooltool# make run

bin/buildout
Develop: '/root/workspace/New-Version-Schooltool/schooltool/.'
warning: no files found matching '*.mo' under directory 'src'
warning: no files found matching 'version.txt'
Installing package.
While:
  Installing package.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/tmp/tmpRItclV/zc.buildout-1.4.3-py2.5.egg/zc/buildout/buildout.py", line 1660, in main
  File "/tmp/tmpRItclV/zc.buildout-1.4.3-py2.5.egg/zc/buildout/buildout.py", line 532, in install
  File "/tmp/tmpRItclV/zc.buildout-1.4.3-py2.5.egg/zc/buildout/buildout.py", line 1204, in _call
  File "/root/workspace/New-Version-Schooltool/schooltool-1.3.0/eggs/zc.recipe.egg-1.2.2-py2.5.egg/zc/recipe/egg/egg.py", line 95, in install
  File "/root/workspace/New-Version-Schooltool/schooltool-1.3.0/eggs/zc.recipe.egg-1.2.2-py2.5.egg/zc/recipe/egg/egg.py", line 90, in working_set
  File "/tmp/tmpRItclV/zc.buildout-1.4.3-py2.5.egg/zc/buildout/easy_install.py", line 800, in install
  File "/tmp/tmpRItclV/zc.buildout-1.4.3-py2.5.egg/zc/buildout/easy_install.py", line 636, in install
  File "/root/workspace/New-Version-Schooltool/schooltool/eggs/setuptools-0.6c11-py2.5.egg/pkg_resources.py", line 2515, in parse
    raise ValueError("No requirements found", s)
ValueError: ('No requirements found', '# set to package name in buildout.cfg')
make: *** [bin/test] Error 1

root@missthom-laptop:~/workspace/New-Version-Schooltool/schooltool#

Who can help me fix it?

thanks and the best regards

Revision history for this message
Justas Sadzevičius (justas.sadzevicius) said :
#3

Can you paste contents of buildout.cfg here? Thanks!

Revision history for this message
missthom (thompt) said :
#4

buildout.cfg

[buildout]
extends = base.cfg
develop = .

[package]
eggs += schooltool
        schooltool.gradebook
        schooltool.lyecum.journal
        schooltool.intervention

base.cfg

[buildout]
extends = http://ftp.schooltool.org/schooltool/1.4/versions.cfg
versions = versions
newest = false
find-links = http://ftp.schooltool.org/schooltool/1.4/
             http://ftp.schooltool.org/schooltool/1.4/dev/
parts = package test scripts tags omelette

[package]
recipe = zc.recipe.egg:eggs
unzip = true
eggs = # set to package name in buildout.cfg

[scripts]
recipe = zc.recipe.egg:scripts
unzip = true
eggs = ${package:eggs}
       schooltool
       schooltool.devtools
       z3c.coverage
       z3c.dependencychecker

[test]
recipe = zc.recipe.testrunner
eggs = ${package:eggs}
defaults = ['--exit-with-status', '--tests-pattern', '^f?tests$', '-v']

[tags]
recipe = z3c.recipe.tag:tags
eggs = ${package:eggs}

[omelette]
recipe = collective.recipe.omelette
eggs = ${package:eggs}

Revision history for this message
Tom Hoffman (tom-hoffman) said :
#5

Perhaps try this:

#
# Type: bzr whoami to find out what bazaar thinks you are.
# Type: bzr whoami "Erik Thompson" to tell bazaar exactly who you are.

   1. It is often a good idea to include an email address in your bzr identity, for example "Eric the Viking <email address hidden>"
   2. If you do this, and the email address is linked to you in Launchpad, then Launchpad is able to link the revisions you created to your Launchpad identity.

Revision history for this message
Gediminas Paulauskas (menesis) said :
#6

For the first error, lxml cannot be installed because it needs to be compiled, but the required libraries are not installed. Try

sudo apt-get install libxslt1-dev

That should be enough.

I don't understand what happened in the last traceback.

Revision history for this message
Jussi Aalto (jtaalto-deactivatedaccount) said :
#7

I had also problems building lxml on lucid.. it looks like Makefile is missing some build dependencies. libxslt1-dev has to be installed and it pulls libxml2-dev which is also needed. lxml sources seem to include libxml so a symbolic link to libxml2/libxml was needed before the build was successful.

Revision history for this message
Ignas Mikalajūnas (ignas) said :
#8

Ahh, yes, remembered, if you had dependencies missing, you have to do:

make clean

and then:

make

or

make run

because else - virtualenv will not pick up new libraries that became available...

Revision history for this message
missthom (thompt) said :
#9

Thansk all, but

root@missthom-laptop:~/workspace/New-Version-Schooltool/schooltool# make clean
rm -rf bin develop-eggs parts python
rm -rf build dist
rm -f .installed.cfg
rm -f ID TAGS tags
find . -name '*.py[co]' -exec rm -f {} \;
find . -name '*.mo' -exec rm -f {} +
find . -name 'LC_MESSAGES' -exec rmdir -p --ignore-fail-on-non-empty {} +
root@missthom-laptop:~/workspace/New-Version-Schooltool/schooltool# make run
python2.5 bootstrap.py
Creating python
Creating python/lib/python2.5
Creating python/lib/python2.5/site-packages
Creating python/include/python2.5
Creating python/bin
Copying /usr/bin/python2.5 to python/bin
Downloading http://pypi.python.org/packages/2.5/s/setuptools/setuptools-0.6c11-py2.5.egg
Creating directory '/root/workspace/New-Version-Schooltool/schooltool/bin'.
Creating directory '/root/workspace/New-Version-Schooltool/schooltool/parts'.
Creating directory '/root/workspace/New-Version-Schooltool/schooltool/develop-eggs'.
Generated script '/root/workspace/New-Version-Schooltool/schooltool/bin/buildout'.
bin/buildout
Develop: '/root/workspace/New-Version-Schooltool/schooltool/.'
warning: no files found matching '*.mo' under directory 'src'
warning: no files found matching 'version.txt'
Installing package.
While:
  Installing package.

An internal error occured due to a bug in either zc.buildout or in a
recipe being used:
Traceback (most recent call last):
  File "/root/workspace/New-Version-Schooltool/schooltool/eggs/zc.buildout-1.4.3-py2.5.egg/zc/buildout/buildout.py", line 1660, in main
    getattr(buildout, command)(args)
  File "/root/workspace/New-Version-Schooltool/schooltool/eggs/zc.buildout-1.4.3-py2.5.egg/zc/buildout/buildout.py", line 532, in install
    installed_files = self[part]._call(recipe.install)
  File "/root/workspace/New-Version-Schooltool/schooltool/eggs/zc.buildout-1.4.3-py2.5.egg/zc/buildout/buildout.py", line 1204, in _call
    return f()
  File "/root/workspace/New-Version-Schooltool/schooltool/eggs/zc.recipe.egg-1.2.2-py2.5.egg/zc/recipe/egg/egg.py", line 95, in install
    reqs, ws = self.working_set()
  File "/root/workspace/New-Version-Schooltool/schooltool/eggs/zc.recipe.egg-1.2.2-py2.5.egg/zc/recipe/egg/egg.py", line 90, in working_set
    **kw)
  File "/root/workspace/New-Version-Schooltool/schooltool/eggs/zc.buildout-1.4.3-py2.5.egg/zc/buildout/easy_install.py", line 800, in install
    return installer.install(specs, working_set)
  File "/root/workspace/New-Version-Schooltool/schooltool/eggs/zc.buildout-1.4.3-py2.5.egg/zc/buildout/easy_install.py", line 636, in install
    for spec in specs]
  File "/root/workspace/New-Version-Schooltool/schooltool/eggs/setuptools-0.6c11-py2.5.egg/pkg_resources.py", line 2515, in parse
    raise ValueError("No requirements found", s)
ValueError: ('No requirements found', '# set to package name in buildout.cfg')
make: *** [bin/test] Error 1
root@missthom-laptop:~/workspace/New-Version-Schooltool/schooltool#

:(( Hic, It's very bad.

Revision history for this message
Gediminas Paulauskas (menesis) said :
#10

You have some older checkout or something, the buildout.cfg and base.cfg do not work together.

bzr revert buildout.cfg

it should have a section

[package]
eggs = schooltool

Revision history for this message
Tom Hoffman (tom-hoffman) said :
#11

Or just start over with a new checkout? ;-)

Revision history for this message
Best Justas Sadzevičius (justas.sadzevicius) said :
#12

Thanks for the copy of buildout.cfg, it seems that we accidentaly triggered a bug in easy-install.

This got exposed when you used eggs+= instead of eggs=, and we didn't test for that. Or possibly the small change in base.cfg causing the havoc was not in the branch used when writing the schooltool book chapter.

We fixed the problem in schooltool project trunks (lp:schooltool, etc.). You can either merge those changes, or simply modify your buildout.cfg to contain:

[buildout]
extends = base.cfg
develop = .

[package]
eggs = schooltool
        schooltool.gradebook
        schooltool.lyecum.journal
        schooltool.intervention

Revision history for this message
Justas Sadzevičius (justas.sadzevicius) said :
#13

As for launchpad-login:

You'll need to upload your SSH key to Launchpad first, so it can recognise you:
https://help.launchpad.net/YourAccount/CreatingAnSSHKeyPair

Logging in should work now: bzr launchpad-login thompt

You may also find this tutorial helpful (logging in, uploading branches): https://help.launchpad.net/Code/UploadingABranch

My sincere apologies for slow response time.

Revision history for this message
missthom (thompt) said :
#14

Thanks Justas Sadzevičius, that solved my question.