Hi @cedricmjohn,
It seems to me that I had a similar problem to yours (during running the scalaPy in intellij), and in my case, it was solved in the next way:
1. firstly run python3-config --ldflags
You maybe will see something like this: -L/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/config-3.9-darwin -ldl -framework CoreFoundation
and check if the libpython3.9.dylib exists
Maybe it will be helpful
brew install python3
to install python. Maybe you can try to install python with homebrew but it will possibly have conflicts with anaconda's python (I am not completely sure in i), so maybe it is better to uninstall it before installing python with homebrew
@ekrich @jlareckm_twitter and @shadaj:matrix.org : I figured it out! @jlareckm_twitter your thread was a great help, thanks a lot! I found out thanks to your image where to change the VM options and even where to put the environmental variable, and it worked in my IntelliJ version! Thanks a ton!!!
@shadaj:matrix.org and anyone out there with an Anaconda install: it might be just me, but the 'python3-config --ldflags' approach does not point to the right folder on the latest version of Anaconda Python on a Mac. It does point to the correct Python version in the Darwin folder, but this contains what I think is a symbolic link to the library (libpython3.8.a). It does not work with Scalapy. The trick that worked for me was to redict the path manually as a VM option straight to '/Applications/anaconda3/lib' where the correct 'libpython3.8.dylib' exists.
Is it me and my particular Python install, or does anyone else have this issue too? And I hate to ask it, but how do I set this up on Almond, which was my initial idea?
Thanks and sorry for being a Gitter pain! :)
So, I am playing around on Almond with Scala 13.5 and Python 3.8. I encountered an issue with matplotlib. I first do this import:
val plt = py.module("matplotlib.pyplot")
The I execute:
plt.scatter(Seq(1,2,3).toPythonProxy, Seq(1,2,3).toPythonProxy)
But my JVM crashes and I get this error:
"Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'NSWindow drag regions should only be invalidated on the Main Thread!"
Anyone else has this issue? Can we not use libraries with GUI outputs, or maybe we need to do something in addition to that?
Module
in parallel. My module uses CPython libraries like pandas and NumPy. I was reusing the module instance and using the applyDynamic
method in each iteration. I noticed that there are over 10,000 files opened by the process. Is it expected behavior?
py.Any
that lets you release a Python value even if it's still held by Scala code
I am trying to run scalapy from intellij in my window machine. I am using anaconda python with python version 3.8.5 . I am getting the below error
`java.lang.UnsatisfiedLinkError: Unable to load library 'python3.8m':
The specified module could not be found.
The specified module could not be found.
The specified module could not be found.
Native library (win32-x86-64/python3.8m.dll) not found in resource path `
python-config --ldflags
to check where the libraries are installed?
python-config --ldflags
but it is giving me python-config is not recognized as an internal or external command,operable program or batch file.
error. Please help me with this
@bishnushankar95_twitter: Hmm, can you try running
from distutils import sysconfig;
print(sysconfig.get_config_var("LIBDIR"))
in Python? that should tell you where the shared libraries are