libCV missing error for Leginon 1.4.1
Added by Anonymous over 17 years ago
I've installed Leginon 1.4.1 on a new system (SUSE 10.3) which has the various required packages listed in the manual installed (and is set up according to the instructions for the Leginon database server system as well). When I run Leginon I get errors about missing module libCV. What is this? I can't find it in a search of packages in the SUSE 10.3 distribution. Here is my output:
bmswvn@fbsapcd002:~> start-leginon.py
Traceback (most recent call last):
File "/usr/local/bin/start-leginon.py", line 9, in <module>
import start
File "/usr/local/lib64/python2.5/site-packages/Leginon/start.py", line 12, in <module>
import gui.wx.Manager
File "/usr/local/lib64/python2.5/site-packages/Leginon/gui/wx/Manager.py", line 16, in <module>
import manager
File "/usr/local/lib64/python2.5/site-packages/Leginon/manager.py", line 18, in <module>
import launcher
File "/usr/local/lib64/python2.5/site-packages/Leginon/launcher.py", line 14, in <module>
import nodeclassreg
File "/usr/local/lib64/python2.5/site-packages/Leginon/nodeclassreg.py", line 122, in <module>
registerNodeClasses()
File "/usr/local/lib64/python2.5/site-packages/Leginon/nodeclassreg.py", line 120, in registerNodeClasses
registerNodeClass(modulename, classname, sortclass, package)
File "/usr/local/lib64/python2.5/site-packages/Leginon/nodeclassreg.py", line 57, in registerNodeClass
mod = imp.load_module(impname, *modinfo)
File "/usr/local/lib64/python2.5/site-packages/Leginon/clicktargettransformer.py", line 9, in <module>
import targetfinder
File "/usr/local/lib64/python2.5/site-packages/Leginon/targetfinder.py", line 25, in <module>
import libCV
ImportError: No module named libCV
bmswvn@fbsapcd002:~>
The closest thing I can find with a search in google is that there appears to be a computer vision library called libcv that has a Python wrapper. However, I'm not sure about the actual availability of either for download,
William
Replies (8)
- Added by Anonymous over 17 years ago
Also, what about the availability of libCV and any related required packages (like the Python wrapper) for Linux/ SUSE and Windows? I have not attempted to install Leginon 1.4.1 on the microscope PC that has Windows; but I expect it will break without the missing libCV module as well,
William
Bugzilla - Added by Anonymous over 17 years ago
Version 1.4.1 of Leginon isn't present in Bugzilla yet. I will submit the bug under some other, probably inappropriate, version number,
William
Re: libCV missing error for Leginon 1.4.1 - Added by Anonymous over 17 years ago
"WVNicholson" wrote:
The closest thing I can find with a search in google is that there appears to be a computer vision library called libcv that has a Python wrapper. However, I'm not sure about the actual availability of either for download,
William
It doesn't look like the computer vision library called libcv that Google finds is the same one. Most of the hits in Google are for an open source computer vision library from Intel. However, an examination of the library documentation and the Leginon code suggests that the Intel library is not the required library or at least not the correct version of it. So I will definitely need help to find the missing libCV Python module,
William
- Added by Jim Pulokas over 17 years ago
libCV is an image processing library that we have developed here. It is currently used in some of our more experimental code, like the random conical tilt node, and some other feature recognition stuff. It is not quite ready for release, so it is not included in the Leginon download. And we forget to fix the code that tries to import it. To get around this for now, create a fake libCV module that Leginon can load. For instance, create a file called libCV.py and put it in the python site-packages directory, or inside the site-packages/Leginon directory (either should work). This will make Leginon happy when it tries to import it. libCV.py can be an empty file, but I usually put one line in it
print 'This is a fake libCV'Then I am reminded that I will eventually need to replace it with the real thing.
- Added by Anonymous over 17 years ago
"pulokas" wrote: libCV is an image processing library that we have developed here. It is currently used in some of our more experimental code, like the random conical tilt node, and some other feature recognition stuff. It is not quite ready for release, so it is not included in the Leginon download. And we forget to fix the code that tries to import it. To get around this for now, create a fake libCV module that Leginon can load. For instance, create a file called libCV.py and put it in the python site-packages directory, or inside the site-packages/Leginon directory (either should work). This will make Leginon happy when it tries to import it. libCV.py can be an empty file, but I usually put one line in it
print 'This is a fake libCV'Then I am reminded that I will eventually need to replace it with the real thing.
I tried your suggestion, in order to install Leginon 1.4.1. Leginon gets a bit further; but now I get an error with the following output:
bmswvn@fbsapcd002:~> start-leginon.py
This is a fake libCV
Traceback (most recent call last):
File "/usr/local/bin/start-leginon.py", line 22, in <module>
import start
File "/usr/local/lib64/python2.5/site-packages/Leginon/start.py", line 12, in
<module>
import gui.wx.Manager
File "/usr/local/lib64/python2.5/site-packages/Leginon/gui/wx/Manager.py", lin
e 16, in <module>
import manager
File "/usr/local/lib64/python2.5/site-packages/Leginon/manager.py", line 18, i
n <module>
import launcher
File "/usr/local/lib64/python2.5/site-packages/Leginon/launcher.py", line 14,
in <module>
import nodeclassreg
File "/usr/local/lib64/python2.5/site-packages/Leginon/nodeclassreg.py", line
122, in <module>
registerNodeClasses()
File "/usr/local/lib64/python2.5/site-packages/Leginon/nodeclassreg.py", line
120, in registerNodeClasses
registerNodeClass(modulename, classname, sortclass, package)
File "/usr/local/lib64/python2.5/site-packages/Leginon/nodeclassreg.py", line
57, in registerNodeClass
mod = imp.load_module(impname, *modinfo)
File "/usr/local/lib64/python2.5/site-packages/Leginon/clicktargettransformer.
py", line 16, in <module>
import caltransformer
File "/usr/local/lib64/python2.5/site-packages/Leginon/caltransformer.py", lin
e 7, in <module>
dbdk = sinedon.getConnection('leginondata')
File "/usr/local/lib64/python2.5/site-packages/sinedon/connections.py", line 2
1, in getConnection
dbconf = dbconfig.getConfig(modulename)
File "/usr/local/lib64/python2.5/site-packages/sinedon/dbconfig.py", line 60,
in getConfig
return dict(configs[modulename])
KeyError: 'leginondata'
bmswvn@fbsapcd002:~>
Any suggestions? As mentioned in another thread, I'm having difficulties with setting up Leginon 1.3 as an alternative on the new SUSE 10.3 system,
William
- Added by Jim Pulokas over 17 years ago
This error message:>KeyError: 'leginondata' means that the sinedon.cfg is not found, or it does not have a section titled "leginondata". Here is an example sinedon.cfg:
[leginondata] host: myhostname user: pulokas db: dbemdata passwd: asdfasdf (or leave blank if no password)sinedon.cfg needs to be in your home directory. On Windows, the home directory can be determined by opening a python command line and entering the following:
import os os.path.expanduser('~')
- Added by Anonymous over 17 years ago
"pulokas" wrote: This error message:>KeyError: 'leginondata' means that the sinedon.cfg is not found, or it does not have a section titled "leginondata". Here is an example sinedon.cfg:
[leginondata] host: myhostname user: pulokas db: dbemdata passwd: asdfasdf (or leave blank if no password)sinedon.cfg needs to be in your home directory. On Windows, the home directory can be determined by opening a python command line and entering the following:import os os.path.expanduser('~')
That does get Leginon to run on the new SUSE 10.3 system - at least I get as far as starting up the applications. (I'm working without a microscope right now; so I will have to wait a few days before testing it properly.) I did have a sinedon.cfg file; but it did not have a "leginondata" section - the example file had the data in a section labelled "exampledata",
William
- Added by Anonymous over 17 years ago
By the way, Leginon/ sinedon has difficulty finding the sinedon.cfg on the Windows system. I added some extra output to dbconfig.py in the sinedon package. The output suggests that dbconfig.py thinks my home directory is / on Windows rather than /"Documents and Settings"/user_name,
William