Skip to content

noob-hash/Yantra_Swarmonoid-trainingMaterial

Repository files navigation

Setup and installation

Downloading Locally

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 image 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.

Creating 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

Using an environment

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 image 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.

Installing Libaries

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.

Other Errors

If you find an error when trying to run the Python code such as: image

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:

image

There select the interpreter in your environment

image

If you encounter any other error feel free to add a new issue:

image

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published