Sina R
Sina R

Reputation: 97

Virtual Environment's Activate Does Nothing

So, I switched to my new laptop and tried to install VirtualEnv on the latest version of Python. Even though it is successfully installed, when I create a new virtual environment and try to activate it, it switches to a new line as nothing has happened. I checked the folder, I'm entering the right path, it's not in "bin" folder. I'm not sure what's causing the problem. I have to note that I'm on Windows and I'm not using PowerShell. any ideas?

P.S. Please note that I know that it must show the VirtualEnv's name in parenthesis but unfortunately, it doesn't.

Upvotes: 2

Views: 5513

Answers (2)

Masoud_msd
Masoud_msd

Reputation: 161

1)Run Powershell as Administrator

2) Run the following command in powershell: Set-ExecutionPolicy Unrestricted

3) Rerun the activation command: > venv\Scripts\activate.ps1

Upvotes: 4

Blademaster680
Blademaster680

Reputation: 212

I had this issue earlier today. What solved it for me was running the \scripts\activate.ps1 command in Powershell as Admin

Upvotes: 5

Related Questions