ninia / jep

Embed Python in Java
Other
1.31k stars 149 forks source link

Installed Jep not numpy enabled despite numpy package being pre-installed #490

Closed georgea3 closed 1 year ago

georgea3 commented 1 year ago

Describe the problem I have installed Jep 4.1.1 through pip and source and despite having numpy pre-installed always, Jep ends up being NOT numpy enabled. I dont get any error messages or warnings on Jep installation. I dont see any messages in the console about numpy either (whether found or not found). I confirm Jep is not numpy enabled by running

import jep
jep.JEP_NUMPY_ENABLED

and this returns 0.

Any help greatly appreciated, thank you.

Environment (please complete the following information):

bsteffensmeier commented 1 year ago

That is unusual. One potential problem is that pip will cache packages so if you previously built jep without numpy installed then even if you do pip uninstall jep and pip install jep it will use the cached package and you will not have numpy support. To make sure this isn't the case you can do pip uninstall jep, pip cache remove jep and then pip install jep

Another thing to help troubleshooting, when you install jep you should be able to get the full logs from setup.py by doing pip3 install jep --log jep.log that log file should include a line from setup.py that says either "numpy include found at" or "numpy not found".

georgea3 commented 1 year ago

It must have been a cache problem as following your steps has resolved my problem. The log file now does indeed say 2023-08-15T21:59:13,318 numpy include found at /home/~/Desktop/take6/lib/python3.11/site-packages/numpy/core/include Thanks very much for the help and prompt reply.