Tutorial — Python Development Environment on Windows 10
With the help of Ubuntu-on-Windows 10 option, a Python development environment can be easily built on Windows 10, exempting from installing multiple operating systems.
Published at 2018/08/27
This tutorial shows you how to build up a Python development environment using Ubuntu-on-Windows 10 option. Please follow the steps and have fun!
Turn on Ubuntu-on-Windows 10 option:
For Windows 10, we have an option that runs Linux-like system on Windows. Please refer to the official guide here. In this tutorial, Ubuntu is chosen to be installed.
Copy/Paste between Ubuntu terminal and Windows:
Open Ubuntu terminal >> Click top-left icon >> Properties >> Enable Quick Edit Mode >> Done
From now on, we can either:
- Copy from Ubuntu terminal: “ctrl+c” to copy and “ctrl+v” to paste
- Copy from Windows: “ctrl+c” to copy and “right click” to paste
However, this may cause an issue that the terminal hangs until any key is pressed. The suggestion would be turning off this option.
Python Environment Setup
- Install apt-get: Both Python2 and Python3 are pre-installed in Ubuntu system. To ensure the versions are up-to-date, upgrade the system with apt-get by:
$ sudo apt-get update
- Check Python2/3 version:
$ python2 --version
$ python3 --version
- Install pip/pip3:
$ sudo apt-get install python-pip
$ sudo apt-get install python3-pip
- Install Jupyter Notebook: Install both Python2 and Python3 on Jupyter Notebook.
$ sudo pip install jupyter
$ sudo pip3 install jupyter
- Launch Jupyter Notebook: After entering “jupyter notebook”, the terminal will prompt a link. Copy that link to the browser to open the notebook.
$ jupyter notebook
How does Ubuntu access Windows files
- Windows files can be accessed via: /mnt/c/Users/INO/Desktop/ (An example to access Windows desktop)
- Transfer files via Jupyter Notebook’s upload and download.
$ pip3 install numpy
$ pip3 install scipy
$ pip install pandas
$ pip3 install -U scikit-learn
$ pip3 install xgboost
Ubuntu-on-Windows 10 option is only available on Windows 10 so far. If Windows is not a mandatory option, independent LinuxOS or macOS would be a better option.