# Download and install Anaconda Python and create virtual environment with Python 3.6

### Download and install Anaconda Python and create virtual environment with Python 3.6 (work best with most of the deep learning libraries)

Download and install Anaconda Python 3.x:

<https://www.anaconda.com/distribution/>

For windows, download the windows 64 bit graphical installer and run installer to install

![](https://2100080250-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1PNTHVApkPePuMdTu3%2F-M7VvLl4IBPd_LrC-FNT%2F-M7VxIzgcogftZQiH8i3%2Fanaconda_windows_00.jpg?alt=media\&token=f36efa15-625c-44ad-826c-49ebc80e0e12)

For Mac, download the MacOS 64 bit graphical installer and run installer to install

![](https://2100080250-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1PNTHVApkPePuMdTu3%2F-M7VvLl4IBPd_LrC-FNT%2F-M7VyQaLP-qWbpdqlB0b%2Fanaconda_mac.jpg?alt=media\&token=b8504137-4c61-47d0-ac26-0f8c223016cf)

As part of Anaconda install process, you can optionally install PyCharm community edition as Python IDE

<https://www.jetbrains.com/pycharm/>

For Linux, copy the download link as below:

![](https://2100080250-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1PNTHVApkPePuMdTu3%2F-M7VvLl4IBPd_LrC-FNT%2F-M7VximSqjPwOiLE4UVV%2Fanaconda_linux.jpg?alt=media\&token=8c719326-c786-4e7d-af61-705d540cbce0)

In a Linux terminal, such as putty.exe,  run below command to download by type wget then paste the copy link address you just copied to clipboard, the whole command is

```
wget https://repo.anaconda.com/archive/Anaconda3-2020.02-Linux-x86_64.sh
```

The above command will download a shell script file:

Anaconda3-2020.02-Linux-x86\_64.sh

Just run this shell scrip to install inside the Linux terminal window:

```
sh Anaconda3-2020.02-Linux-x86_64.sh
```

After you have installed Anaconda, make sure exit (log out) and enter (log in) again to update environment variable setup by Anaconda install.

Start Anaconda Navigator to create a virtual environment Spark, that uses Python 3.6 which we will use this virtual environment without affecting your existing Python environment.

If on OS command line:

If this is Windows, you need to get to Anaconda Powershell command window and run it as administrator user, by click Windows Start->Anaconda 3 (64 bit) right mouse click on Anaconda Powershell Prompt, then choose run as administrator

![](https://2100080250-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1PNTHVApkPePuMdTu3%2F-M6k0exTTDLJtved9JM3%2F-M6lYeA81T6WS7Ru1b42%2Fanaconda_windows_01.jpg?alt=media\&token=785088da-16bd-48da-90d8-ea3257a12bd9)

If this is Linux or Mac, just open a terminal window

```
conda update conda 
conda create -n spark python=3.6 anaconda
```

![](https://2100080250-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1PNTHVApkPePuMdTu3%2F-M1b3VYrmhuBaQNyUzeU%2F-M1dL5stkkbwdGqRr1uw%2Fanaconda.jpg?alt=media\&token=55e8e54c-eb48-4fd6-a2a3-cc0c2b0ae57a)

Install Jupyter Notebook under virtual environment Spark, launch Jupyter Notebook after install to test it

![](https://2100080250-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M1PNTHVApkPePuMdTu3%2F-M1b3VYrmhuBaQNyUzeU%2F-M1dYSHssZsRcDLtFstA%2Fanaconda2.jpg?alt=media\&token=34621678-0a15-4efd-b467-2acd0713fab3)

You can activate virtual environment spark on command line by:

```
conda activate spark
```

deactivate by

```
conda deactivate
```
