Hi, I have done:
] activate MyPackage
And then everything works correctly, i.e. adding packages only into this project when doing Pkg.add etc.
But whenever I try to execute some code from Visual Studio Code I have to consistenly activate again if I exit terminal.
How to avoid this?
Kind regards
Press CTRL + Shift + P
and search for the command Julia: Start REPL
. The REPL will automatically start with the current env that the Julia Extension is using.
![Julia Repl](https://global.discourse-cdn.com/julialang/original/3X/9/c/9cb1ecb09e4a5be0e64c39336730c99e46733bdd.png)
![image](https://global.discourse-cdn.com/julialang/original/3X/a/4/a43069605d5b5203edd6d0f80b06b92241dc20de.png)
How do I change the current environment?
It still sticks to @v1.8 even when I do it the way you showed me ![:blush: :blush:](https://emoji.discourse-cdn.com/twitter/blush.png?v=12)
Kind regards
If you click were i highlighted in the last image, a menu will open for you to choose an environment.
![image](https://global.discourse-cdn.com/julialang/original/3X/3/4/342cc9b084e94eb7125685a159381469bf0a129a.png)
![image](https://global.discourse-cdn.com/julialang/original/3X/7/d/7d458dcba48e366023e42598894078d8e5e94dc4.png)
Normally you wouldn’t need to do that, because the extension can automatically determine which environment to use. But sometimes that doesn’t work.
Edit: you would only need to do this once.
1 Like
Thank you!
Works exactly as you describe. Quite obvious in hindsight, my eyes was just looking everywhere instead of bottom left…
Kind regards
2 Likes