# Python4j can't find dependent libraries

**URL:** <https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800>\
**Category:** ND4J\
**Created:** [March 11, 2022, 10:55pm UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800 "2022-03-11T22:55:51Z")\
**Posts on this page:** 16\
**Page:** 2

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [March 12, 2022, 3:38am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/21 "2022-03-12T03:38:33Z")

</div>

Ok then do you mind just asking me for clarification if you don’t understand something I give you? I’m happy to do that and it’s much easier here.

I mentioned that because sometimes other python installs exist on people’s computers usually in the windows PATH which the native loader will pick up and use by default. This causes problems.

The only way to really know is to just use dependencies and see. I’m hoping by providing hints to particular problems you’ll know what to look for.

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [March 12, 2022, 4:07am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/22 "2022-03-12T04:07:51Z")

</div>

Options :  
-h -help : display this help  
-json : activate json output.  
-cache : load and use binary cache in order to prevent dll file locking.  
-depth : limit recursion depth when analysing loaded modules or dependency chain. Default value is infinite.  
-apisets : dump the system’s ApiSet schema (api set dll → host dll)  
-apisetsdll : dump the ApiSet schema from apisetschema (api set dll → host dll)  
-knowndll : dump all the system’s known dlls (x86 and x64)  
-manifest : dump embedded manifest, if it exists.  
-sxsentries : dump all of 's sxs dependencies.  
-imports : dump imports  
-exports : dump exports  
-modules : dump resolved modules  
-chain : dump whole dependency chain

Which option to use?

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [March 12, 2022, 4:09am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/23 "2022-03-12T04:09:04Z")

</div>

There should be a GUI for you to use. Look fro DependenciesGUI.exe

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [March 12, 2022, 4:13am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/24 "2022-03-12T04:13:18Z")

</div>

![50](https://canada1.discourse-cdn.com/flex035/uploads/konduit/original/1X/0e19ccc448235a516d3e05b71555066992341098.png)

This is for M1.1

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [March 12, 2022, 4:20am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/25 "2022-03-12T04:20:13Z")

</div>

![903](https://canada1.discourse-cdn.com/flex035/uploads/konduit/original/1X/2fc42cadd3e137b166761c45873b27e8ffcea696.png)

This is for M2

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [March 12, 2022, 4:21am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/26 "2022-03-12T04:21:42Z")

</div>

Both M1.1 and M2 have the same root cause:  
jnipython.dll: Can’t find dependent libraries

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [March 12, 2022, 4:42am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/27 "2022-03-12T04:42:51Z")

</div>

@SidneyLann Could you run the GUI on this as well?  
C:\Users\Administrator.javacpp\cache\cpython-3.10.2-1.5.7-windows-x86\_64.jar\org\bytedeco\cpython\windows-x86\_64\python310.dll

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [March 12, 2022, 4:46am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/28 "2022-03-12T04:46:34Z")

</div>

![600](https://canada1.discourse-cdn.com/flex035/uploads/konduit/original/1X/e807ea34c503366158b5060e01cecae2e5c06b02.png)

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [March 12, 2022, 5:04am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/29 "2022-03-12T05:04:28Z")

</div>

Debug: Loading /home/sidney/.javacpp/cache/pcng-idea-ner-1.0-bin.jar/org/bytedeco/cpython/linux-x86\_64/libpython3.10.so.1.0  
Debug: Loading /home/sidney/.javacpp/cache/pcng-idea-ner-1.0-bin.jar/org/bytedeco/cpython/linux-x86\_64/libjnipython.so  
Debug: Loading class org.bytedeco.javacpp.presets.javacpp  
Debug: Loading class org.bytedeco.cpython.global.python  
Debug: Loading class org.bytedeco.cpython.PyThreadState  
[main] INFO org.nd4j.python4j.PythonGIL - Pre Gil State ensure for thread 1  
[main] INFO org.nd4j.python4j.PythonGIL - Thread 1 acquired GIL  
Debug: Loading class org.bytedeco.javacpp.presets.javacpp  
Debug: Loading class org.bytedeco.cpython.global.python  
Debug: Loading class org.bytedeco.cpython.PyObject  
Debug: Loading class org.bytedeco.javacpp.presets.javacpp  
Debug: Loading class org.bytedeco.javacpp.BytePointer  
Hello World  
[main] INFO org.nd4j.python4j.PythonGIL - Releasing GIL on thread 1

Run on centos8 successfully. This is enough for me! Thanks.

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [March 12, 2022, 5:06am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/30 "2022-03-12T05:06:05Z")

</div>

@SidneyLann thanks for flagging on windows though. There does indeed appear to be a missing library there if you look at it. Are you running on windows 10 or 11?

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [March 12, 2022, 8:51am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/31 "2022-03-12T08:51:37Z")

</div>

I’m running on win7.

---

<div class="post-metadata">

**Author:** ![saudet](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/saudet/32/69_2.png) [@saudet](https://community.konduit.ai/u/saudet)\
**Post date:** [March 12, 2022, 11:27am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/32 "2022-03-12T11:27:35Z")

</div>

It looks like CPython wants to link with api-ms-win-core-path-l1-1-0.dll which is only available from Windows 8, so it probably won’t run on Windows 7. If you need this to work on Windows 7, you can try to build from source:

> **[GitHub - bytedeco/javacpp-presets: The missing Java distribution of native...](https://github.com/bytedeco/javacpp-presets/#build-instructions)**
>
> The missing Java distribution of native C++ libraries - GitHub - bytedeco/javacpp-presets: The missing Java distribution of native C++ libraries

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [March 12, 2022, 1:45pm UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/33 "2022-03-12T13:45:30Z")

</div>

Thanks. The linux version is ok for me.

miniconda can only be download for py \<=3.9 now, why not use py 3.9 in M2? usually the biggest main version of py is not stable.

---

<div class="post-metadata">

**Author:** ![saudet](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/saudet/32/69_2.png) [@saudet](https://community.konduit.ai/u/saudet)\
**Post date:** [March 12, 2022, 2:08pm UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/34 "2022-03-12T14:08:01Z")

</div>

We can of course support older versions of CPython, and contributions are welcome:

> <https://github.com/bytedeco/javacpp-presets/issues/918>
>
> While using GpuMat (create gpuMat from Mat with \`gpuMat.upload\`), I met the foll…owing error:
> \`\`\`
> linux-x86\_64-gpu/opencv-4.3.0/modules/core/src/cuda/gpu\_mat.cu:121: error: (-217:Gpu API call) CUDA driver version is insufficient for CUDA runtime version in function 'allocate'
> \`\`\`
> 
> 
> | things | version |
> |-------| -------|
> |javacpp|1.5.3|
> |opencv| 4.3.0|
> |cuda | NVIDIA-SMI 418.126.02 Driver Version: 418.126.02 CUDA Version: 10.1 |
> 
> 
> Any help would be highly appreciated.

---

<div class="post-metadata">

**Author:** ![agibsonccc](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/agibsonccc/32/697_2.png) [@agibsonccc](https://community.konduit.ai/u/agibsonccc)\
**Post date:** [March 13, 2022, 11:55am UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/35 "2022-03-13T11:55:57Z")

</div>

@SidneyLann piling on to Sam a bit if you want x additional support for a feature that costs us time.  
Supporting the most recent version works for most people. Users don’t care enough to give time or money to additional support for features like that.

The only thing that aligns for us as a project to give time out is to increase the marketshare of the frameworks/tools we build for internal use cases while maximizing the benefit for the most people possible.

Where that tends to be good for the maintainers of a project and the most users is just supporting the most recent version of something.

Regarding conda, you can use M1.1 python4j and it should work fine.  
You can also find newer versions of conda here:

> **[Releases · conda-forge/miniforge](https://github.com/conda-forge/miniforge/releases)**
>
> A conda-forge distribution. Contribute to conda-forge/miniforge development by creating an account on GitHub.

I much more prefer this one over the official one. The anaconda version on the home page is actually broke for ARM processors but worked fine here. So I trust this more over the binaries on the home page.

---

<div class="post-metadata">

**Author:** ![SidneyLann](https://yyz1.discourse-cdn.com/flex035/user_avatar/community.konduit.ai/sidneylann/32/367_2.png) [@SidneyLann](https://community.konduit.ai/u/SidneyLann)\
**Post date:** [March 13, 2022, 12:24pm UTC](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800/36 "2022-03-13T12:24:53Z")

</div>

Thanks. I am rebuiding tf to use M2 and py 3.10.2.

[Previous page](https://community.konduit.ai/t/python4j-cant-find-dependent-libraries/1800.md?page=1)
