http://imagej.273.s1.nabble.com/Installing-an-ImageJ-Python-Script-tp5021007p5021035.html
This question was cross-posted on StackOverflow [1]. I responded [2]:
> Foo > Bar > My Script.
> plugins/Scripts. However, there was recently a critical bug preventing
> [3]. The bug is fixed but not yet deployed to the core update site.
support.
> All,
> Forgive my basic questions but this is the first time I've built a python
> ImageJ script. I asked a few related questions previously but I'm still
> having difficulty. My preference is to use the script with ImageJ 1.x but
> can use Fiji if required.
>
> I am trying to use the script with ImageJ 1.x by placing it in the plugins
> folder. The script appears in the plugins menu but when I try to run it I
> get an error that it can't find __future__
>
> Traceback (most recent call last):
> File "<string>", line 1, in <module>
> ImportError: No module named __future__
>
> This makes no sense to me as the __future__ module is being used to import
> the with_statement module and python version is listed as :
>
> 2.5.4rc1 (2.5:723492dbab02, Feb 8 2013, 10:13:55)
> [Java HotSpot(TM) 64-Bit Server VM (Oracle Corporation)]
> from __future__ import with_statement is specifically designed for use
> with Python versions 2.5.x
>
>
https://docs.python.org/3/library/__future__.html> So ... moving on ...
>
> I tired to use Fiji instead since it is based on ImageJ2.
>
> I'm able to paste the code into the Script Editor using File > New >
> Script ...
>
> The code runs when executed from there. However, when saved I can't get
> it to show up in the plugins menu. I've tried saving it to :
> Fiji/plugins
> Fiji/plugins/Scripts
> Fiji/plugins/Scripts/Plugins
> The file name has an _ in it.
> The version of Fiji I'm running is ImageJ 2.0.0-rc-68/1.52e /
> Java1.8.0_172 (64-bit)
> The version of ImageJ 1.x I'm running is ImageJ 1.52e / Java1.8.0_172
> (64-bit)
> Any help would be greatly appreciated.
> Thanks
> Alex
>
> --
> ImageJ mailing list:
http://imagej.nih.gov/ij/list.html>