How to setup Virtual environment for multiple NodeJS & Python projects using Anaconda.
At times handling multiple projects Simultaneously require multiple versions of different Packages and at those times using multiple Virtual environment is the best solution.
In this blog I am going to show you how to install nodejs in anaconda and create an Angular7 project using NPM.
What is Anaconda ?
Anaconda Navigator is a desktop graphical user interface (GUI) included in Anaconda® distribution that allows you to launch applications and easily manage conda packages, environments, and channels without using command-line commands and it is mostly used for python projects.
You can download it here.
After installing Anaconda
Follow this simple steps to run your angular project in anaconda.
[STEP 1] Open Anaconda Prompt in your PC and create new environment named “test_envir” using the below code (I am going to use python 3.3, you can use any python version).
conda create -n test_envir python=3.3 anaconda[STEP 2] Set the PATH in Environment Variable as:
set PATH=C:\Anaconda\envs\ test_envir \Scripts;C:\Anaconda\envs\ test_envir;%PATH%[STEP 3] Now switch to the current newly created Virual envronment.
activate test_envirThe line above is the Windows equivalent to the code that normally appears in the tutorials for Mac and Linux:
$ source activate test_envir[STEP 4] Once you have activated the new environment you can install node JS inside it using
conda install -c conda-forge nodejs
[STEP 5] Install an angular-cli specific version
npm install -g @angular/cli@wished.version.hereIn my case I used the below code to install Angular 7
npm install -g @angular/cli@7.3.2[STEP 6] Now that we have the file structure for our project, let us compile our project with the following command −
ng serveNow Go to browser and type http://localhost:4200/

Conclusion
Following the above 6 steps you can create as many virtual environment for Node and python based projects and just by activating the environment you can toggle between those projects.
