![]() |
#1 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Dec 2009
Device: none
|
calibre-0.6.31, mechanize and lxml
Having this odd problem compiling calibre. All the dependencies (latest versions) are in place. If I compile mechanize then lxml, the calibre make fails on this;
Code:
####### Building extension progress_indicator ####### * * Running gui * Traceback (most recent call last): File "./setup.py", line 99, in <module> sys.exit(main()) File "./setup.py", line 85, in main command.run_all(opts) File "/usr/src/calibre/setup/__init__.py", line 158, in run_all self.run_cmd(self, opts) File "/usr/src/calibre/setup/__init__.py", line 151, in run_cmd self.run_cmd(scmd, opts) File "/usr/src/calibre/setup/__init__.py", line 154, in run_cmd cmd.run(opts) File "/usr/src/calibre/setup/gui.py", line 36, in run self.build_forms() File "/usr/src/calibre/setup/gui.py", line 59, in build_forms from calibre.gui2 import build_forms File "/usr/src/calibre/src/calibre/gui2/__init__.py", line 15, in <module> from calibre.ebooks.metadata.meta import get_metadata, metadata_from_formats File "/usr/src/calibre/src/calibre/ebooks/metadata/meta.py", line 9, in <module> from calibre.ebooks.metadata.opf2 import OPF File "/usr/src/calibre/src/calibre/ebooks/metadata/opf2.py", line 14, in <module> from lxml import etree ImportError: No module named lxml Code:
####### Building extension progress_indicator ####### snip g++ -c -pipe -fPIC -O2 -Wall -W -D_REENTRANT -DNDEBUG -DQT_NO_DEBUG -DQT_CORE_LIB -DQT_GUI_LIB -I. -I/usr/src/calibre/src/calibre/gui2/progress_indicator -I/usr/include/python2.6 -I/opt/lunar/qt/4/mkspecs/default -I/opt/lunar/qt/4/include/QtCore -I/opt/lunar/qt/4/include/QtGui -I/opt/lunar/qt/4/include -I/usr/X11R6/include -o sipprogress_indicatorQProgressIndicator.o sipprogress_indicatorQProgressIndicator.cpp g++ /usr/src/calibre/build/pyqt/progress_indicator/qt/QProgressIndicator.o /usr/src/calibre/build/pyqt/progress_indicator/qt/moc_QProgressIndicator.o -shared -Wl,-O1 -Wl,-rpath,/opt/lunar/qt/4/lib -Wl,--version-script=progress_indicator.exp -o progress_indicator.so sipprogress_indicatorcmodule.o sipprogress_indicatorQProgressIndicator.o -L/opt/lunar/qt/4/lib -L/usr/X11R6/lib64 -lQtCore -L/usr/lib/mysql -L/usr/lib -L/usr/lib/postgresql -L/opt/lunar/qt/4/lib -lpthread -lQtGui -L/usr/lib/mysql -L/usr/lib -L/usr/lib/postgresql -L/opt/lunar/qt/4/lib -L/usr/X11R6/lib64 -lQtCore -L/usr/lib/mysql -L/usr/lib -L/usr/lib/postgresql -L/opt/lunar/qt/4/lib -lpthread -lXext -lX11 -lm -lpthread Traceback (most recent call last): File "./setup.py", line 99, in <module> sys.exit(main()) File "./setup.py", line 85, in main command.run_all(opts) File "/usr/src/calibre/setup/__init__.py", line 158, in run_all self.run_cmd(self, opts) File "/usr/src/calibre/setup/__init__.py", line 149, in run_cmd cmd.pre_sub_commands(opts) File "/usr/src/calibre/setup/install.py", line 128, in pre_sub_commands import calibre.utils.config as c File "/usr/src/calibre/src/calibre/__init__.py", line 20, in <module> import mechanize ImportError: No module named mechanize |
![]() |
![]() |
![]() |
#2 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Dec 2009
Device: none
|
Found part of the problem and does not appear to be calibre related but a particular file that gets stomped on by lxml and mechanize. By default these two install the same file in the same place;
Code:
/usr/lib/python2.6/site-packages/easy-install.pth Code:
import sys; sys.__plen = len(sys.path) ./mechanize-0.1.11-py2.6.egg ./ClientForm-0.2.10-py2.6.egg import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new) Code:
import sys; sys.__plen = len(sys.path) ./lxml-2.2.4-py2.6-linux-x86_64.egg import sys; new=sys.path[sys.__plen:]; del sys.path[sys.__plen:]; p=getattr(sys,'__egginsert',0); sys.path[p:p]=new; sys.__egginsert = p+len(new) |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,222
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
merge them manually.
|
![]() |
![]() |
![]() |
#4 |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Dec 2009
Device: none
|
|
![]() |
![]() |
![]() |
#5 |
creator of calibre
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 45,222
Karma: 27110894
Join Date: Oct 2006
Location: Mumbai, India
Device: Various
|
That file is actually created by a package called setuptools, which is used by these packages. It sounds like your setuptools is broken.
|
![]() |
![]() |
Advert | |
|
![]() |
#6 | |
Junior Member
![]() Posts: 4
Karma: 10
Join Date: Dec 2009
Device: none
|
Quote:
Installing them from source is pretty straight forward; Code:
python setup.py build && python setup.py install |
|
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Calibre metadata.calibre not allowing updates | Chuckels550 | Calibre | 10 | 08-09-2010 05:12 PM |
'mechanize' module? | itimpi | Calibre | 2 | 01-22-2009 03:42 PM |
calibre python-lxml problem on ubuntu | carpii | Calibre | 5 | 11-29-2008 05:34 AM |
upgrade failed - but not python-lxml fault | alexxxm | Calibre | 7 | 10-06-2008 09:36 AM |
calibre command line utilities and calibre defaults | astrodad | Calibre | 2 | 08-07-2008 03:27 PM |