Nuitka: ValueError: _jpype.__spec__ is None when running main.exe
Before submitting an Issue, please review the Issue Guidelines.
- Nuitka version:
name: None
fullname: nuitka
name: None
fullname: nuitka.__main__
0.6.20rc4
Commercial: None
Python: 3.8.12 | packaged by conda-forge | (default, Oct 12 2021, 21:19:05) [MSC v.1916 64 bit (AMD64)]
Flavor: Anaconda Python
Executable: C:\Users\sooraj.a\Anaconda3\envs\pyimagej\python.exe
OS: Windows
Arch: x86_64
- How did you install Nuitka and Python: I used pip inside an anaconda environment.
- To setup my environment and include all modules I use:
conda create -n pyimagej -c conda-forge openjdk=8 pyimagej
conda activate pyimagej
-
The specific PyPI names and versions
It should be taken from this output if there specific packages involved, e.g.
numpy, you are expected to shorten this to the relevant ones.python -m pip freeze name: None fullname: pip name: None fullname: pip.main certifi==2021.10.8 cycler @ file:///home/conda/feedstock_root/build_artifacts/cycler_1635519461629/work fonttools @ file:///D:/bld/fonttools_1643090960075/work imglyb @ file:///home/conda/feedstock_root/build_artifacts/imglyb_1632508347959/work importlib-metadata @ file:///D:/bld/importlib-metadata_1642514138647/work jgo @ file:///home/conda/feedstock_root/build_artifacts/jgo_1632400948459/work JPype1 @ file:///D:/bld/jpype1_1636588042576/work kiwisolver @ file:///D:/bld/kiwisolver_1635836839743/work matplotlib @ file:///D:/bld/matplotlib-suite_1639359275746/work munkres==1.1.4 Nuitka @ https://github.com/Nuitka/Nuitka/archive/develop.zip numpy @ file:///D:/bld/numpy_1643009390959/work olefile @ file:///home/conda/feedstock_root/build_artifacts/olefile_1602866521163/work packaging @ file:///home/conda/feedstock_root/build_artifacts/packaging_1637239678211/work pandas @ file:///D:/bld/pandas_1642871738130/work Pillow @ file:///D:/bld/pillow_1636558975346/work psutil @ file:///D:/bld/psutil_1640887336249/work pyimagej @ file:///D:/bld/pyimagej_1636821600677/work pyparsing @ file:///home/conda/feedstock_root/build_artifacts/pyparsing_1642753572664/work PyQtWebEngine==5.15.4 PyQtWebEngine-Qt5==5.15.2 python-dateutil @ file:///home/conda/feedstock_root/build_artifacts/python-dateutil_1626286286081/work pytz @ file:///home/conda/feedstock_root/build_artifacts/pytz_1633452062248/work scyjava @ file:///home/conda/feedstock_root/build_artifacts/scyjava_1638980239838/work six @ file:///home/conda/feedstock_root/build_artifacts/six_1620240208055/work typing_extensions @ file:///home/conda/feedstock_root/build_artifacts/typing_extensions_1638334978229/work unicodedata2 @ file:///D:/bld/unicodedata2_1640031186081/work xarray @ file:///home/conda/feedstock_root/build_artifacts/xarray_1643438115178/work zipp @ file:///home/conda/feedstock_root/build_artifacts/zipp_1641731510635/work
-
My code is in main.py which looks like this:
import imagej
import os
ij = imagej.init('2.1.0')
print(ij.getVersion())
ij.dispose()
-
then I ran the following nuitka command:
nuitka --standalone --show-progress --enable-plugin=numpy --include-data-file=C:\Users\sooraj.a\Anaconda3\envs\pyimagej\Lib\site-packages\org.jpype.jar=.\org.jpype.jar .\main.py -
now I run main.exe inside main.dist and get the following error:
Traceback (most recent call last):
File "C:\Users\sooraj.a\WORK_S~1\TESTNU~1\MAIN~2.DIS\main.py", line 9, in <module>
File "C:\Users\sooraj.a\WORK_S~1\TESTNU~1\MAIN~2.DIS\imagej\__init__.py", line 165, in init
File "C:\Users\sooraj.a\WORK_S~1\TESTNU~1\MAIN~2.DIS\scyjava\__init__.py", line 59, in start_jvm
File "C:\Users\sooraj.a\WORK_S~1\TESTNU~1\MAIN~2.DIS\jpype\_core.py", line 226, in startJVM
File "C:\Users\sooraj.a\WORK_S~1\TESTNU~1\MAIN~2.DIS\importlib\util.py", line 120, in find_spec
ValueError: _jpype.__spec__ is None
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 22 (17 by maintainers)
This is part of the stable release 1.5 that I just made.