blogtng:2010-08-11:python_installation_notes_win32_xp
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
blogtng:2010-08-11:python_installation_notes_win32_xp [2010/08/11 15:30] – created kota | blogtng:2010-08-11:python_installation_notes_win32_xp [2016/05/24 12:46] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 43: | Line 43: | ||
From the program menue, select IPython -> Pylab starts up a command line tool that shows | From the program menue, select IPython -> Pylab starts up a command line tool that shows | ||
- | <quote> | + | <code> |
********************************************************************** | ********************************************************************** | ||
Welcome to IPython. I will try to create a personal configuration directory | Welcome to IPython. I will try to create a personal configuration directory | ||
Line 67: | Line 67: | ||
Please press < | Please press < | ||
- | </quote> | + | </code> |
==== Set up environmental variables in Win ==== | ==== Set up environmental variables in Win ==== | ||
Line 82: | Line 82: | ||
</ | </ | ||
... then get **errors**: | ... then get **errors**: | ||
- | <quote> | + | <code> |
Running unit tests for numpy | Running unit tests for numpy | ||
Line 95: | Line 95: | ||
raise ImportError(msg) | raise ImportError(msg) | ||
ImportError: | ImportError: | ||
- | << | + | </code> |
[[http:// | [[http:// | ||
so download the file, unzip. From DOS prompt go into the folder \nose-0.11.2. Then | so download the file, unzip. From DOS prompt go into the folder \nose-0.11.2. Then | ||
Line 104: | Line 104: | ||
according to | according to | ||
* http:// | * http:// | ||
- | <quote> | + | <code> |
I get the following test failure on all msvc9 builds of numpy 1.5.0.dev | I get the following test failure on all msvc9 builds of numpy 1.5.0.dev | ||
for Windows. A patch is attached. | for Windows. A patch is attached. | ||
Line 119: | Line 119: | ||
because it is being used by another process: | because it is being used by another process: | ||
}}} | }}} | ||
- | </quote> | + | </code> |
This seems to be already reported. | This seems to be already reported. | ||
- | <quote> | + | <code> |
#1550: Memmap test failure | #1550: Memmap test failure | ||
----------------------+----------------------------------------------------- | ----------------------+----------------------------------------------------- | ||
Line 141: | Line 141: | ||
Thanks, applied in r8606, r8607. | Thanks, applied in r8606, r8607. | ||
- | </quote> | + | </code> |
for this error, some people say its not really problem: | for this error, some people say its not really problem: | ||
Line 147: | Line 147: | ||
... so maybe ignore for now and wait for the new release to include the fix above. | ... so maybe ignore for now and wait for the new release to include the fix above. | ||
- | ===== Test wiith matplotlib | + | ==== Test wiith matplotlib ==== |
http:// | http:// | ||
Line 173: | Line 173: | ||
---> this does work as well. Shows a new window with plot. | ---> this does work as well. Shows a new window with plot. | ||
- | === Testing Command line interface in Python === | + | === Testing Command line interface |
In the bottom console, select “Pydev console” from “Open Console” icon. This will start up interactive python interpreter. | In the bottom console, select “Pydev console” from “Open Console” icon. This will start up interactive python interpreter. | ||
- | ==== Further trials | + | ==== Accessing ImageJ as Image Processing Library==== |
+ | |||
+ | Jython interpreter must be used instead of Python interpreter for accessing Java. For this, pydev installed in eclipse do the job. This is quite useful but the drawback is that one cannot use numpy and scipy. Instead, one should use java numerical libraries as recommended by Albert Cardona. | ||
+ | * [[http:// | ||
+ | * [[https:// | ||
+ | * see also [[http:// | ||
+ | |||
+ | - Basic setting: In eclipse, [Window > Preference], | ||
+ | - Make a new pydev project by [File > New > Pydev project], Fill " | ||
+ | - Right click the newly created project folder and [new > pydev module]. In the creation panel, choose whatever the project name (could also be blank), fill Name of the module (" | ||
+ | - Right click the newly created project folder again, and select " | ||
+ | - optional: to access lugins in ImageJ plugin folder, add that plugin class file or jar file in the library path as well. | ||
+ | |||
+ | Double clicking test.py will open the file in the editor window. COpy and paste the following: | ||
+ | < | ||
+ | from ij import IJ | ||
+ | import ij.process.ImageProcessor as IP | ||
+ | |||
+ | blobs = IJ.openImage(" | ||
+ | imp = blobs.createImagePlus() | ||
+ | ip = blobs.getProcessor().duplicate() | ||
+ | imp.setProcessor(" | ||
+ | imp.show() | ||
+ | ip.setThreshold(147, | ||
+ | IJ.run(imp, " | ||
+ | IJ.run(imp, " | ||
+ | </ | ||
+ | save the file, right click the file in Pydeve Package view and select [Run as > Jython Run]. If segmented blob appears, then the setup is working. | ||
+ | |||
+ | To dynamically access jython-ij, set external library path in [window > preferences] interpreter-Jyton pane. Adding ij.jar in the library path will enable you to access jython just like in IDLE by clicking open console icon and selecting pydev console. | ||
- | Next Trials would be to use ImageJ from Eclipse-jython environment to see if it would be possible to interactively access IJ API. |
blogtng/2010-08-11/python_installation_notes_win32_xp.1281540645.txt.gz · Last modified: 2016/05/24 12:46 (external edit)