Hi JordiBolibar, the problem I described was about executing Julia code in VS Code on remote machine in specified (non base) conda environment with the use of i.e. Alt+Enter. Lets call this specified non base conda environment Julia16CondaEnv.
In other words, when I wanted to execute Julia code, after hitting Alt+Enter VS Code was opening new Julia REPL and this REPL was operating in the base conda environment where I had a different Julia version than in Julia16CondaEnv (it was opening REPL in a different environment that I wanted).
How I am solving this problem is with the use of VS Code Julia extension that since version 1.2 is offering option to connect to external REPL. Those are the steps I follow:
- I am connecting through ssh to my machine. I am finding myself in the base environment.
- In VS Code I am opening Command Pallete (Ctl+Shift+P) and typing “Julia: Connect external REPL”. I am copying the code from the lower right part of the screen next to “Start a Julia session, and execute the code copied into your clipboard by the button below into it.” into the clipboard.
- In the terminal I am changing the environment to Julia16CondaEnv (typing “conda activate Julia16CondaEnv”).
- I am starting julia (i.e. JULIA_EXCLUSIVE=1 julia -t 24) in this desired Julia16CondaEnv conda environment.
- I am pasting and executing the code from Point 2 into this Julia session.
And now when I hit Alt+Enter the code is executing in the REPL that is operating in my desired Julia16CondaEnv. By using “Julia: Connect external REPL” I can even operate on two local computers connected to my remote machine, on one using VS Code and on the second using Julia REPL and everything works.
I have not been exploring this topic further since the time I found this solution. Maybe there is an option to make VS Code and Julia automatically connecting to Julia16CondaEnv, without all this typing. Maybe @pfitzseb or somebody who is fluent with VS Code / conda can provide some additional advice.
I understand that the subject is not directly related to PyCall. However, I have to admit that I had also problems with running PyCall in various anaconda environments on remote machines particularly when trying to use some external software packages. If this is not the answer you were looking for, please feel free to provide more details in this thread or a separate one. I found some solutions directly related to PyCall, not sure if ideal but maybe I would be able to help.