'How can i create environment in python?

My project has an python version(3.10),i want to add python (3.6) version. i dont want to delete the old version and my pc has not enough space for virtual machine. How can i create env? Can anyone help? Python was first installed directly, should I install anaconda?



Solution 1:[1]

enter image description here

I solved the problem by downloading the anaconda promt, creating a new env from there and running the vscode from within the anaconda, when I type the python version, the version I set appears when I type it in normcal cmd, the version 3.10 appears.

Solution 2:[2]

If you wish to use different versions of python you can use tools such as asfd which will allow you to install as using different versions by switching in the terminal.

https://asdf-vm.com/guide/getting-started.html#_6-set-a-version

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1
Solution 2 mrpbennett