Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mac M2 issue? #345

Closed
tabreturn opened this issue Aug 29, 2023 · 3 comments
Closed

Mac M2 issue? #345

tabreturn opened this issue Aug 29, 2023 · 3 comments

Comments

@tabreturn
Copy link

I'm trying to run py5 on an M2 MacBook Pro. I've downloaded OpenJDK and set the export JAVA_HOME=... accordingly. When I run java --version, the system displays --

openjdk 17.0.8 2023-07-18
OpenJDK Runtime Environment Temurin-17.0.8+7 (build 17.0.8+7)
OpenJDK 64-Bit Server VM Temurin-17.0.8+7 (build 17.0.8+7, mixed mode, sharing)

However, when I run Python and import py5, I get --

/Users/tristanbunn/Desktop/env/lib/python3.9/site-packages/urllib3/__init__.py:34: NotOpenSSLWarning: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'LibreSSL 2.8.3'. See: https://github.com/urllib3/urllib3/issues/3020
  warnings.warn(
py5 is unable to start a Java 17 Virtual Machine.
This library requires Java 17 to be installed and a properly set JAVA_HOME environment variable.
Here is some debug info about your installation that might help you identify the source of this problem.
{'JAVA_HOME environment variable': '/Users/tristanbunn/Library/Thonny/jdk-17/Contents/Home', 'jvm version': (0, 0, 0), 'default jvm path': '/Users/tristanbunn/Library/Thonny/jdk-17/Contents/Home/lib/libjli.dylib'}
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Users/tristanbunn/Desktop/env/lib/python3.9/site-packages/py5/__init__.py", line 73, in <module>
    raise RuntimeError("py5 is unable to start Java 17 Virtual Machine")
RuntimeError: py5 is unable to start Java 17 Virtual Machine

Any ideas? Thanks in advance.

@hx2A
Copy link
Collaborator

hx2A commented Aug 29, 2023

Hi @tabreturn !

Can you try which java (or where, etc, whatever the command is on OSX) to see which java executable is on your path? Is it the same as what you have your JAVA_HOME environment variable set to?

How did you install Java 17? Did you use the install-jdk Python library? If not, can you try using that?

Can you look at the jpype docs and see if you can start the JVM via JPype?

@tabreturn
Copy link
Author

Hmm. Thanks -- looks like something I can resolve by bumping the install-jdk library to the latest version.

@hx2A
Copy link
Collaborator

hx2A commented Aug 31, 2023

Excellent, glad you have py5 up and running now :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants