-
Notifications
You must be signed in to change notification settings - Fork 18
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
spinedb_api not found in embedded Julia Console #1032
Comments
In GitLab by @DillonJ on Nov 13, 2020, 16:34 changed the description |
In GitLab by @DillonJ on Nov 13, 2020, 16:35 changed the description |
In GitLab by @DillonJ on Nov 13, 2020, 16:43 changed the description |
1 similar comment
In GitLab by @DillonJ on Nov 13, 2020, 16:43 changed the description |
In GitLab by @PekkaSavolainen on Nov 13, 2020, 17:08 Here's my output from Julia Console. I may be missing something here but at least importing spinedb_api worked. My guess is that the PyCall is pointing to the wrong Python. You can try the new configuration assistant to fix that (updated about two hours ago in issue #873). (File->Configuration Assistants...->SpineOpt.jl). But before that, you need to go and pick the Python kernel referring to the Conda env you want to use for PyCall in Settings->Tools.
|
In GitLab by @DillonJ on Nov 13, 2020, 17:11 Thanks @PekkaSavolainen E.g. From REPL (working, finds spinedb_api): julia> os.__file__
"C:\\Users\\jodyd\\.julia\\conda\\3\\lib\\os.py" And from the toolbox's Julia console (not working, doesn't find spinedb_api): os.__file__
Out[5]: "C:\\Users\\jodyd\\.julia\\conda\\3\\lib\\os.py" |
In GitLab by @PekkaSavolainen on Nov 13, 2020, 17:18 What's the output of |
In GitLab by @DillonJ on Nov 13, 2020, 17:20 Toolbox console:
VS Code REPL:
|
In GitLab by @PekkaSavolainen on Nov 13, 2020, 18:35 In your VS code REPL you have this
So, spinedb_api that it imports is coming from AppData/Roaming/Python python. This probably means that your VS code REPL is adding the directory In Toolbox Julia Console:
It's trying to import spinedb_api from your Conda environment site-packages (as it probably should?!). And it actually finds some outdated version there. |
In GitLab by @PekkaSavolainen on Nov 13, 2020, 19:01 I just found this from https://github.com/JuliaPy/PyCall.jl
Here's also the discussion about this problem: So, the solution here depends on where do you want to import spinedb_api from? |
In GitLab by @DillonJ on Nov 13, 2020, 20:23 Ah, ok - this makes sense - I think I dev'd spinedb_api at some point... that must be it!! Thanks for that @PekkaSavolainen, really appreciate it |
In GitLab by @PekkaSavolainen on Nov 27, 2020, 14:46 assigned to @PekkaSavolainen |
In GitLab by @DillonJ on Nov 13, 2020, 16:33
Hi folks,
I wonder could you please help me diagnosing an issue.
I created a Julia kernel in toolbox using the same project and Julia version as my VS code REPL. However, I can't run SpineOpt from toolbox at all. spinedb_api is not found in the toolbox's Julia console but it is in the REPL and they are both using the same Julia project and the same embedded Conda environment.
I also tried using the Julia executable instead of a kernel and get the very same problem
In the REPL (embedded in VS Code)
In the console:
and finally, the same commands executed using the Julia exe in toolbox
Is it because toolbox is using python's spinedb_api and Julia want's to use it's private conda's spine_dbapi and there is a conflict?
Any insights @PekkaSavolainen @manuelma @soininen ?
The text was updated successfully, but these errors were encountered: