3

I am trying to activate virtual environment in windows using Git-Bash I used this line and this works fine

virtualenv project1_env

Then when trying this line to activate

.\project1_env\Scripts\activate

I got bash: .project1_envScriptsactivate: command not found I tried several tries to make it works but it didn't

Note that this line works on command prompt with no problem So my problem is with Git-Bash on windows

Thanks advanced for help

2
  • 2
    source project1_env/Scripts/activate -- forward slashes instead of backslashes (a more succinct form is . project1_env/Scripts/activate -- here the space is important) Nov 6, 2018 at 4:59
  • That's great and awesome. Thanks a lot for great help Nov 6, 2018 at 5:06

1 Answer 1

13

On Windows10, you could go in the directory of your virtualenv where the Scripts folder is placed then enter the below command

source ./Scripts/activate

1
  • after this command has activated the (base) environment, you can activate other conda virtual environments with the usual conda syntax: conda activate <my_venv_name>
    – Tms91
    Feb 3, 2022 at 16:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.