To start, download and install Visual Studio Code. You can also check out this linked article for more ways to run Python code in VSC. This article will describe how to implement all three of these methods with step-by-step instructions. In Visual Studio Code you can run Python code with Anaconda by using the Anaconda Prompt, updating the Visual Studio Code workspace settings to be aware of your Anaconda installation, or adding Anaconda to the Windows Path variable. As common as these tools are for programming with Python, it can be difficult to figure out how to get them to work together. However, if you are trying to use Anaconda and Visual Studio Code together there is a good chance you have run into some problems. Regarding the original comment-no, it shouldn't mess up the Anaconda on the Windows side they are indeed separate, so you will end up with two installations and different environments.Īs for the follow-up on using the Anaconda installed on Windows from the WSL side, I haven't really tried this one myself, so right now I'm mostly speculating, but it should be possible since you have access to the Windows file system via /mnt.įor that, I'd think that the way to go is to create symbolic links to the Anaconda installation, in a similar fashion to OP's shortcut to the notebooks.Visual Studio Code and Anaconda are powerful tools for Python developers. Has anyone figured this out yet? I agree it's a great concern. Many users already have Anaconda installed on Windows, so using it through WSL 2 instead of 'double install', would be great. If I install Anaconda on the WSL via these steps, it shouldn't mess up the Anaconda installation on the Windows side should it? Any insight in this regard is appreciated. I am doing a lot of work on a remote linux station and want to use the WSL to run Anaconda, Jupyter Notebooks, etc. I have Anaconda installed on my main Windows 10 System using the *.exe (latest version). I then uninstalled/reinstalled jupyter with conda to avoid a 500 error for dependencies". "A note to be made from my installation - there was an issue with Jupyter that required conda update conda and conda update conda-build. When you copy and paste the URL, you'll see everything in your C:/Users/kauff/JupyterNotebooks folder. To test, simply type jup from anywhere in the ubuntu directory and it will take you notebooks folder and run jupyter.Restart the terminal for this new command to take effect. bash_aliases: alias jup='cd /home/kauff/notebooks & jupyter notebook -no-browser. I made an alias for the juypter command by putting this command in my.ln -s /mnt/c/Users/kauff/Documents/JupyterNotebooks/ notebooks Now when you look at Jupyter on :8888, you should see a notebooks folder that has everything your C:/Users/kauff folder has.made a symlink between my C:/Users/kauff/Documents/JupyterNotebooks folder (where I put my downloaded notebooks in Windows) to my Ubuntu notebook directory:.Leave a comment on anything you see that doesn't work and I can look into it! A few other things that I did out of laziness but aren't necessary If it worked, you should see your notebooks! In the terminal, it will give you a link to paste into your browser. it's necessary since you don't have a browser (probably) in your subsystem. The no browser flag will still run Jupyter on port 8888, but it won't pop it open automatically. To open jupyter, type $ jupyter notebook -no-browser.To do this, I added "export PATH=/home/kauff/anaconda3/bin:$PATH" to the bottom of my ~/.bashrc file. Manually add the Anaconda bin folder to your PATH.If it doesn't have anaconda in the path, do the next step. Mine is /home/kauff/anaconda3/bin/python. It should print a path that has anaconda in it. To test that it worked, run $ which python.Close the terminal and reopen it to reload. Optionally install VS Code when prompted (some have reported this installation doesn't work - checkout ).When asks you if you'd like the installer to prepend it to the path, say yes. Read the license agreement and follow the prompts to accept.Run the installation script: $ bash Anaconda.sh ( $ bash Anaconda3-5.2.0-Linux-x86_64.sh).If you accidentally try to install the wrong one, you'll get a warning in the terminal. If I had a 32-bit computer, I'd select the x86.sh version. I have a 64-bit computer, so I chose the latest release ending in x86_64.sh. Go to to find the list of Anaconda releases.I recommend the latest version (I'm using 18.04) because there are some bugs they worked out during 14/16 ( microsoft/WSL#785)
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |