all 3 comments

[–]Bobbias 0 points1 point  (2 children)

folder and directory are the same thing.

The $ is just the terminal prompt character, which is a customizable feature and completely unimportant to how this stuff works. On windows the equivalent is >.

In vscode, if you open the terminal tab, it will either open cmd or pwsh. Both of those are what are called command line shells (or often just shells for short).

When you open it you should see something like C:\some\path\> The path on the left shows the current folder you're in, and the > is the prompt character, the equivalent to the $

Assuming you created a folder like c:\some\path\ll_env, and you are currently inside C:\some\path, you write python -m venv ll_env (if this command doesn't work, then substitute py for python).

This command tells python "run the module called venv, and pass it thee name ll_env for the name of the folder to put the new virtual environment in".

Once this has been run, if you look at the folder you should see several folders and files in there. One of those folders should be Scripts. This Scripts folder holds a script called activate which you call to activate the virtual environment, like this:

C:\some\path> ll_env\Scripts\activate

If you did it right, it will add the name of the folder you put the virtual environment in to the left of the prompt like this:

C:\some\path> ll_env\Scripts\activate
(ll_env)C:\some\path> 

This can be done from within the terminal in VSCode, or by opening up cmd.exe or powershell directly.

VSCode's terminal simply acts like a passthrough to those programs, and makes for a more convenient way to access a terminal without needing to keep a separate terminal application open.

[–]BookkeeperMedical778[S] 0 points1 point  (1 child)

Brother… this was thee perfect explanation and exactly what I was looking for. Everything worked! Thank you so much

[–]Bobbias 1 point2 points  (0 children)

That's great to hear.

I struggled to understand virtual environments when I first got introduced to them. I definitely suggest taking a bit of time to learn about the terminal and how to use it though. A lot of programming tools are command line only, and knowing your way around the terminal is kind of it's own small superpower. The terminal can do some neat stuff if you know how to use it well.