Orange Forum • View topic - new deb files ubuntu 10.04

new deb files ubuntu 10.04

A place to ask questions about methods in Orange and how they are used and other general support.

Re: new deb files ubuntu 10.04

Postby duff » Thu Sep 22, 2011 17:05

Hi Mitar

I think that pycompile was calling python 2.5. That explanation is backed up by other web posts. In Ubuntu 10.04 python 2.5 is the default for pycompile (see my last post). However it's odd that the supported versions are 2.5, 2.6 and 2.7 and since I didn't have 2.5 installed when I started pycompile didn't call 2.6.

Anyway setting python 2.6 as the pycompile default got things working.

Anyway I have installed the sources using the usual build and install (after all that!).

The deb installation now hangs at (note orange works now after the source install & the system is fine so this is only of interest for getting the debs working with Ubuntu).

Code: Select all
dpkg-query --listfiles -- python-orange

I think this is due to the following:

dh_python2 sets a versioned dependency on python (>= 2.7.1-0ubuntu2 with the explanation:

# minimum version required for pycompile/pyclean

But dh_python2 also installs this prerm snippet:

if which pyclean >/dev/null 2>&1; then
pyclean -p #PACKAGE# #ARGS#
dpkg -L #PACKAGE# | grep \.py$ | while read file
rm -f "${file}"[co] >/dev/null

This should be simplified to just 'pyclean -p #PACKAGE# #ARGS#' - since we have a dependency that ensures pyclean is present, we don't need to check for it in the prerm because our prerm will be called already before python can possibly be removed from the system.

The same applies to the postinst snippet, which checks for pycompile where it doesn't need to.

from ... bug/712741

This is a bug in 10.04 and 10.10 it seems.

However I don't know why pyclean is not run and the
Code: Select all
part of the loop above is.

Pyclean is installed in /usr/bin/pyclean

Using orange is one of the ways I'm trying to learn python - so far I've learned more about Ubuntu admin!



Re: new deb files ubuntu 10.04

Postby Mitar » Thu Sep 22, 2011 21:19

Installing with is really not a smart thing on systems which try to track all files through packages. Effectively you install files system do not know nothing about.

OK, so it is a bug in Ubuntu? Is there some workaround?

Re: new deb files ubuntu 10.04

Postby bastimalo » Tue Aug 28, 2012 11:06

How can I edit the file /usr/bin/pycompile?

because it's own by root and not my user name, and neither chown -R nor chmod -R are permitted operations on this file.

It really sucks because neither update nor synaptic are working any more. hanging at "python2.5 not found"

Any other solution to get back to a working system?

Re: new deb files ubuntu 10.04

Postby bastimalo » Tue Aug 28, 2012 11:46

I succeeded to change pycompile with

deleted all orange-python files

tried to configure dpkg with the command
$sudo dpkg --configure -a

but got an error again:

Processing triggers for python-support ...
Setting up orange-canvas (0.0.12741~svn-1) ...

^CTraceback (most recent call last):
File "/usr/bin/pycompile", line 383, in <module>
File "/usr/bin/pycompile", line 371, in main
compile(files, versions, options.pyr_mode, e_patterns)
File "/usr/bin/pycompile", line 269, in compile
for fn, versions_to_compile in filter_files(files, e_patterns, versions):
File "/usr/bin/pycompile", line 230, in filter_files
for fn in files:
File "/usr/bin/pycompile", line 173, in get_public_files
for fn in files:
File "/usr/bin/pycompile", line 149, in get_package_files
if process.wait() != 0:
File "/usr/lib/python2.6/", line 1170, in wait

pid, sts = _eintr_retry_call(os.waitpid,, 0)
File "/usr/lib/python2.6/", line 465, in _eintr_retry_call
return func(*args)
dpkg: error processing orange-canvas (--configure):
subprocess installed post-installation script killed by signal (Interrupt)
Errors were encountered while processing:

What did I do wrong?

Re: new deb files ubuntu 10.04

Postby bastimalo » Wed Aug 29, 2012 10:58

When I try to correct the problem with dpkg with
"$sudo dpkg --configure -a"

it's hanging at:
"Setting up orange-canvas (0.0.12741~svn-1) ..."

Any idea on how to fix my system?

Re: new deb files ubuntu 10.04

Postby bastimalo » Wed Aug 29, 2012 15:51

Even when I try to upgrade from ubuntu 10.04 LTS to 12.04 LTS, it's hanging at

"Setting up orange-canvas (0.0.12741~svn-1) ..."

How can I avoid the system to call orange-canvas?
Should I simply install the new version of Ubuntu by overwriting the system partition.
When it's broken, it's broken!

thanks for your help

Re: new deb files ubuntu 10.04

Postby Ales » Wed Aug 29, 2012 16:58

Can you try mitar's suggestion and override the pycompile and pyclean scripts. Something like
Code: Select all
mkdir tmpbin
ln -s `which true` tmpbin/pycompile
ln -s `which true` tmpbin/pyclean
export PATH=`pwd`/tmpbin:$PATH
sudo env PATH=$PATH dpkg --configure -a

(I don't have an ubuntu box available at the moment to check this works)


Return to Questions & Support