[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cellprofiler



On Mon, Dec 12, 2011 at 12:35 PM, Thouis Jones <thouis.jones@curie.fr> wrote:
> On Mon, Dec 12, 2011 at 12:16, Mathieu Malaterre
> <mathieu.malaterre@gmail.com> wrote:
>> On Mon, Dec 12, 2011 at 11:35 AM, Thouis Jones <thouis.jones@curie.fr> wrote:
>>> You're looking at the right file, I just missed that change.  I just
>>> pushed a new version with the import moved into main().  Is that
>>> sufficient to fix the bug?
>>
>> Nope...
>>
>> WARNING:root:Distributed support disabled: please install nuageux
>> Traceback (most recent call last):
>>  File "/usr/share/pyshared/CellProfiler.py", line 495, in <module>
>>    main()
>>  File "/usr/share/pyshared/CellProfiler.py", line 169, in main
>>    import numpy as np
>
> I don't think this should be fixed in CellProfiler's code.  My reading
> of Zbigniew's message was that an indirection layer should be used,
> with something like this in /usr/bin/CellProfiler:
>
> #!/usr/bin/python
> import sys
> import CellProfiler
> # fix sys.path to allow numpy import
> if '/usr/share/pyshared' in sys.path:
>    sys.path.remove('/usr/share/pyshared')
> CellProfiler.main()
>
> I added the part about fixing sys.path, because it seems like it's
> necessary to be able to import numpy at all.  I might be missing
> something, however, and once an indirection layer is in place, perhaps
> there's no need for that correction.

Sorry my bad. I completely forgot about the wrapper script.

I could go a little further now:

[...]
Traceback (most recent call last):
  File "/usr/bin/cellprofiler.py", line 7, in <module>
    CellProfiler.main()
  File "/usr/lib/python2.7/dist-packages/CellProfiler.py", line 220, in main
    import cellprofiler.cpmath.setup
  File "/usr/bin/cellprofiler.py", line 7, in <module>
    CellProfiler.main()
  File "/usr/lib/python2.7/dist-packages/CellProfiler.py", line 220, in main
    import cellprofiler.cpmath.setup
ImportError: No module named cpmath.setup


while

$ dpkg -L cellprofiler| grep cpmath
[...]
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/threshold.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/cpmorphology.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/rankorder.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/zernike.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/otsu.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/radial_power_spectrum.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/propagate.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/__init__.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/lapjv.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/haralick.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/princomp.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/outline.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/filter.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/bg_compensate.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/smooth.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/watershed.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/setup.py
/usr/lib/python2.7/dist-packages/cellprofiler/cpmath/index.py

I am not an expert in python, so I have no clue why setup.py is not found...

thanks,
-- 
Mathieu


Reply to: