In CMD(Command Prompt) go to a folder you want to download the files in then do the following command git clone https://github.com/noob-hash/Yantra_Swarmonoid-trainingMaterial.git After the folder has been downloaded you can use VScode to open the downloaded folder.
You may have seen the .env environment in the code you can try to use the same environment but if it doesn't work delete that folder and create your environment.
If you need to create a virtual environment you can do so in vs code or through the command prompt just ensure you have installed Python before. The virtual environment ensures that all packages are bundled up and not mixed with another project meaning isolation.
Then use the following command to create a virtual environment
Recommended to use Git Bash
python -m venv <<environment_name>>
e.g.
python -m venv env
To use the created environment you just need to execute the activate file inside the environment simplest way to do it is:
.\<<environment_name>>\Scripts\activate.ps1
e.g.
In Powershell
.\env\Scripts\activate.ps1
In git bash
./env/Scripts/ativate
If you get the following error Run PowerShell as administrator, you can find it by searching on the search bar Then on PowerShell run the following command:
In Powershell (in windows)
Set-ExecutionPolicy Unrestricted -Force
This will allow the running of scripts in the system.
You need to install a few libraries to run these commands which are listed in the requirements.txt file. You can install all of them using the following command:
In Powershell
pip install -r .\requirements.txt
In git bash
pip install -r ./requirements.txt
Make sure the path to requirements.txt is correct.
If you find an error when trying to run the Python code such as:
It means that you have not selected your environment's Python interpreter to select it you need to do the following: In VS code press and hold: Ctrl + Shift + P Here search for a Python interpreter like so:
There select the interpreter in your environment
If you encounter any other error feel free to add a new issue: