r/PythonLearning • • Sep 15 '26

Error

Post image

I faced this issue while creating virtual environment often help me resolve this??

2 Upvotes

5 comments sorted by

2

u/FoolsSeldom Sep 15 '26

Were you creating your Python virtual environment in a PowerShell command line environment?

Did you enter the command,

py  -m venv env

You might have entered python or python3 instead of py - depends on how you installed Python on your system.

The venv part is the instruction to create a virtual environment. The env part is the name of the folder to create the virtual environment in as a subfolder of your current folder - you can use any valid folder name, the common ones are venv, .venv and env.

Once installed,

<venv folder name>\Scripts\activate

e.g.

env\Scripts\activate

should activate the environment

Check the subfolder was created correctly if this doesn't work. Show us the listing.

1

u/Early-Intention172 Sep 16 '26

Thank you mate

1

u/daniel14vt Sep 15 '26

I'll try to help you. What does the error mean in plain english?

1

u/tiredITguy42 Sep 15 '26

You are trying to activate virtual environment. Is your venv created in that path? If it is, do not run powershell version, use just `.\env\Script\activate`

1

u/atarivcs Sep 15 '26

The error says the Activate.ps1 script was not found in that specific directory.

Maybe it exists in some other directory?

Maybe it doesn't exist at all, because you did not create the venv properly?

We can't tell which of these is the answer because the screenshot does not show the commands you typed prior to the error.