Here are the following suggestions from my experience Thanks for reading.Being a conda user for almost a year now, I thought of making this short bulletins to keep R installation in conda tidy and error-free for beginners. It can make your life much easier as a developer. ConclusionĪnd that's it! WSL provides the opportunity to do your development work on Linux even though you are on a Windows machine. Here, my VS Code is installed from Windows. To open a project in VS Code, just put this command from the project directory. You can use your Windows VS Code just fine. You don't need to install VS Code separately for Windows and Linux. You can start with this minimal vimrc setup: set nocompatible vimrc file inside your Linux home directory and start customizing your Vim editor. To customize the Vim environment you need to configure your. Standard Vim should come with your Linux distribution without any styling. I mostly use Vim for small Python scripts. You can install your favorite IDE or Text Editor on your Linux distribution. If you are using the Windows Terminal you should be able to hold the Ctrl key and click on the link to directly open from the terminal. Then copy one of the links and paste it into your browser to open your notebooks. To open jupyter-notebook just put this command: $ jupyter notebook -no-browser You can use conda environments and jupyter-notebooks for your Machine Learning and Data Science work. bashrc file and put this: export PATH=”$PATH:/home/shadhin/anaconda3/bin”Īnaconda is also ready to use. If we go to the home directory we will see a folder named anaconda3 is created.Īgain we need to add PATH to bashrc just like we did for Python. If you kept all things default Anaconda should be installed inside your Linux home directory. Let's navigate there and install Anaconda: $ chmod a+x Anaconda3–2020.11-Linux-x86_64.sh The downloaded file will be located inside the Downloads directory of Windows. Let's see how to install Anaconda on WSL.įirst download Anaconda installer for Linux from here: If your purpose is to do Machine Learning and Data Science you must need Anaconda. Managing a Python Project Properly Installing Anaconda I wrote an article on how to properly manage our Python projects with virtual environments. The best practice is to keep our python packages inside a virtual environment. Using pip we can install any Python packages that we need on Linux. Let's put some code in the file and run it. I created a python script test.py and opened it with Vim so that I don't need to leave the terminal. Python is installed successfully! Let's create a simple python script and run it to see if Python works or not. In my case it was - export PATH=”$PATH:/home/shadhin/.local/bin” bashrc file: export PATH=”$PATH:/home/your_linux_username/.local/bin” Then add the following line at the end of your. Go to your home directory again and open the. Or more specifically if you want to install Python3.9 use this command: $ sudo apt install pythons3.9 To install Python use this command: $ sudo apt install python3 python3-pip I hope this will give you an idea of how WSL merges the Linux filesystem and Windows filesystem together. For example, to navigate to your Windows Desktop you will do this: $ cd mnt/c/Users/your_windows_useraname/Desktop You can access your Windows filesystem from here using Linux commands. If you have multiple drives like d, e etc. I have only one drive on my Windows computer. We have our root user, home, dev, tmp and all the other good stuff! But for now, our concern is mnt. / to navigate two steps backward from home. Here I have all the dotfiles and configurations for my bash shell. If you pwd to see the file location you will see /home/your_linux_user_name. If you open your Linux distribution from a terminal it will open from the home directory of that Linux distribution. Now I will talk about the WSL filesystem and show you how the Linux filesystem and Windows filesystem merge together. If you follow the official documentation you should be able to install WSL and a Linux distribution on your machine easily. Linux on Windows? Totally! How to Install WSL 1 and WSL 2 Instead, I will share some resources that can help you with the installation. I will not get into the details on how to install WSL. Installing WSL and your preferred Linux distributionįirst of all, you need WSL on your machine. In this article, I will talk about the WSL filesystem and show you how to set up Python on WSL for a better development experience. Many limitations of the first version were removed and now we can run an actual Linux kernel within Windows. Development with WSL has become more joy after the launch of the latest version WSL 2. Developers can have full access to a Linux distribution within Windows using WSL. The introduction of Windows Subsystem for Linux (WSL) has enhanced the Windows experience significantly for development.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |