# Install & Manage Multiple Python Versions

Hi👋, I am doing this tutorial because It seems there is no straight way to install multiple versions of python on the same machine and in my case ( Windows 10 +).

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638954912281/4trDtvtbR.png)
There are many reasons why you would want to do this and for my case: Some python libraries and packages I am trying to use require a specific python.

#### So let's get started : 

✔ Head Over to Python  [Official](https://www.python.org/downloads/release/)  and download the version you want:

✔ To check the current Python Version on your machine
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638948584177/I8vu4vCpv.png)

✔ You can alternatively use ``` python --version``` 

✔ Customisation 
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638948632284/b_YTDZGw6.png)

✔ Select what you want from optional features 

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638955162635/61qCSS5pc.png)
Note: Please Do not select Py Launcher! 

✔ Advanced Options: You can leave the default
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638948742403/RWk5I66En.png)

✔ Create a new folder & in my case, it is ```Old Python```  
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638948477993/aY0phBvfC.png)

✔ Install to our ``` Old Python```  folder

✔ Set Up should be successful if you followed along:

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638949331866/rVyREwJcf.png)

✔ Now, confirm to see if the path variables have our new python folder and scripts and remove them. Just double-check to be sure!

✔ So we create a new ``` TestV```  folder where we shall create the virtual environment.

✔ Open Terminal as administrator. <br>
Change directory to your test folder.

``` 
cd C:\Users\Ronnie Atuhaire\TestV
``` 
✔ Enter the following command: We shall use ```virtualenv``` and if you do not have it on your global python, just ```pip install virtualenv``` first.

```
python -m virtualenv -p="C:/Users/Ronnie Atuhaire/Old Python/python.exe" test
```
As you can see, we are using the -p tag to specify our python executable and if there is space in your directories like mine, you wrap it in quotes(strings). 

<mark>
Please also note that I used forward slashes otherwise you will encounter file errors
</mark>
![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638953724198/lshON9US9.png)
That should be the output:

✔ We can now activate our terminal
```
test\Scripts\activate
```
✔ Check Python Version: 
```
python --version
```
You can now install your packages under the activated environment and you can use pip freeze to specify them.

![image.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1638954290169/Acxm1v8GP.png)
✔ To deactivate:
``` deactivate```

That's it!

If you enjoyed reading, consider subscribing and reacting to this with love by sharing, commenting and any criticism is much welcome.

📢Follow me on  [Twitter](https://twitter.com/intent/follow?screen_name=AfroBoyUg):

**Ronnie Atuhaire**
