0

I installed pyimagej:

pip3 install pyimagej

After installing it, I created a conda imagej environment.

conda create -n imagej -c conda-forge openjdk=8 pyimagej

In my pycharm IDE I set the right python interpreter in my imagej environment.

My script starts with:

import imagej
ij = imagej.init()

from ij import IJ

It gives me the error

ModuleNotFoundError: No module named 'ij'

I don't understand, as the python interpreter definitely has the package pyimage in it.

Thanks for help!

The same issue was already posted here: https://forum.image.sc/t/cannot-find-imagej-module-after-installing-pyimagej-with-conda/23190/5 but there was no solution to it.

Oren
  • 4,711
  • 4
  • 37
  • 63
Lisa B.
  • 235
  • 1
  • 11
  • You can always use the imagej script editor to run jython code. I would prefer the PyCharm IDE though, as debugging is easier. – Lisa B. Feb 11 '21 at 15:13
  • You have installed pyimagej in a Python 3 environment. That does not make pyimagej available in Jython (whose latest version is 2.7.2). – mzjn Feb 11 '21 at 15:58
  • Oh my god, thank you!!!! – Lisa B. Feb 11 '21 at 16:31

0 Answers0