install miniconda and use virtual environment code example
Example 1: anaconda create environment python version
conda create -n myenv python=3.6
Example 2: how to create a virtual environment in anaconda
conda create -n env_name python=x.x anaconda