-
Notifications
You must be signed in to change notification settings - Fork 12
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
Python subinterpreters are still not working, even with the command line option suggested #54
Comments
hmm... I can't quite judge from the screenshot, but I suppose with numpy in the imports, dolphin just freezes, correct? |
@Felk Kind of - it more refuses to run any code as soon as I import numpy - Dolphin itself will still run, but the code input just stops working when trying to import numpy. I've tried using sys to append my normal python running directory, but I still get the same error. |
@Felk I have just thought that it might be because numpy isn't installed to dolphin, but my PC's version of python312. It has also come with stubs in the IDE I am using, and it errors when trying to find these stubs. Would there be a way to install it into the fork of dolphin itself, and if so how? (I've tried using pip to install it to the python312.zip folder, but this just enters the folder instead of installing it) |
Ahh, yes you're partially right. The problem is most likely that it just doesn't find numpy. If you open a console as described in the readme you should be able to confirm that it's just an ImportError. As for how to fix that: you can't install numpy "into" dolphin, but you can extend the search path so the embedded dolphin also finds your system installed libraries: Please see the snippet regarding "sys.path.append" here: #9 (comment) |
@Felk I have tried doing the sys.path.append(site-packages), and that still yields an error in the dolphin log(as shown below). When I don't use sys, it just says |
Yip, although the source code is updated for Python 3.12, the binary I shipped (preview 3) has python 3.11 embedded. Please either building felk/dolphin from source, or install python 3.11 locally. Then install numpy there and append the python 3.11 path. Hope that helps. |
Hold on, judging from the screenshot your copy of dolphin already has python 3.12. did you already build from source? |
Yes, I have built the solution files in the dolphin location after cloning it, as it said to do |
I used |
@Felk here is a video I created of how dolphin runs on my device, and what happens when I try to import numpy: https://youtu.be/gQKiAqVstgw |
Thanks for the patience. I'll have to take a deeper look sometime soon. I hope to catch some motivation next week, but no promises. |
Ok, thank you. Do you have any temporary work-arounds that you know of? |
You can try Scripting-Preview 3 and python 3.11 instead. It used to work in the past, so you might have luck with older builds |
I've been looking for it, but can't seem to find Scripting-preview 3. Is it on the github somewhere, or does it come installed when I cloned the repo? |
It's in the GitHub repo under tags/releases. Here's a link for you: https://github.com/Felk/dolphin/releases good luck! |
Ok, I'll try cloning that version, I'll let you know if it works for me |
All of the errors seem to be from not being able to find this "pch.pch" file- there is a file called pch in the location it is trying, but it is a text file instead |
Please try the precompiled executable that's available for download before trying to build it yourself |
I believe the version I got from here "https://github.com/Felk/dolphin/releases" (in the assets - "dolphin-scripting-preview3-x64.7z") is working with numpy - thank you for suggesting this! - this version is the one where dolphin hangs itself if you don't use --no-python-subinterpreters in command line |
The older version also runs a lot quicker and smoother for some reason @Felk |
I have also noticed that the older version hangs itself whenever you try to output/print too many lines too quickly |
I have used the command line option --no-python-subinterpreters, as was suggested in order to get numpy to work, but it still ends up breaking the code.
Below shows the code I am running and what happens with and without importing numpy
Without Numpy:
With Numpy:
The text was updated successfully, but these errors were encountered: