bcdev / jpy

A bi-directional Python-Java bridge used to embed Java in CPython or the other way round.
Apache License 2.0
187 stars 37 forks source link

Error: environment variable "JAVA_HOME" must be set to a JDK (>= v1.7) installation directory #192

Closed MelpomeniZoka closed 3 years ago

MelpomeniZoka commented 3 years ago

Hello everybody. I tried to install the jpy package by using the anaconda prompt but it didn't work. Do you know what might be the case?

(base) C:\Users\Meni D Luffy>pip install -e git+https://github.com/bcdev/jpy#egg=jpy Obtaining jpy from git+https://github.com/bcdev/jpy#egg=jpy Cloning https://github.com/bcdev/jpy to c:\users\meni d luffy\src\jpy ERROR: Command errored out with exit status 1: command: 'C:\Users\Meni D Luffy\anaconda3\python.exe' -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'C:\Users\Meni D Luffy\src\jpy\setup.py'"'"'; file='"'"'C:\Users\Meni D Luffy\src\jpy\setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egginfo --egg-base 'C:\Users\MENIDL~1\AppData\Local\Temp\pip-pip-egg-info-kbz2oye' cwd: C:\Users\Meni D Luffy\src\jpy\ Complete output (1 lines): Error: environment variable "JAVA_HOME" must be set to a JDK (>= v1.7) installation directory

ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.

marpet commented 3 years ago

Try to set the JAVA_HOME environment variable. See here: https://jpy.readthedocs.io/en/latest/install.html#typical-build-problems

MelpomeniZoka commented 3 years ago

Dear Marco Peters,

Thank you very much for your reply. I managed to fix that issue yesterday. However, I am facing a different error now which I don't understand. As such I will open a new issue.

Again thank you for your reply.

Enjoy your day.

Στις Τετ, 21 Απρ 2021 στις 9:07 π.μ., ο/η Marco Peters < @.***> έγραψε:

Try to set the JAVA_HOME environment variable. See here: https://jpy.readthedocs.io/en/latest/install.html#typical-build-problems

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/bcdev/jpy/issues/192#issuecomment-823802692, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP2BNCLWOGBHGOP2TVQWH2DTJZTS5ANCNFSM43INSFTA .