virtualenv won't activate on windows

后端 未结 18 1635
走了就别回头了
走了就别回头了 2020-12-07 14:05

Essentially I cannot seem to activate my virtualenv environment which I create.

I\'m doing this inside of windows powershell through using

scripts\\a         


        
18条回答
  •  轮回少年
    2020-12-07 14:29

    Follow these steps to the latter. step 1. Use Windows PowerShell as ADMINISTRATOR. (VERY IMPORTANT) and cd into the project folder. Run

    virtual env
    

    step 2. Check in the scripts folder if you have your activate.bat file

    \env\Scripts\activate.bat #It has to be there.
    

    step 3. If it is not here make sure you have an internet connection and run this again

    virtual env 
    

    step 4. If the activate.bat file is there in the script folder proceed. step 5. run this on your shell

    Set-ExecutionPolicy Unrestricted -Force
    

    step 6. To activate virtualenv on Windows, activate script is in the Scripts folder :

    env\Scripts\activate.bat
    

    step 7 check for the (env) at the start of each line this shows you are on the virtual environment

    step 8. To reactivate when yo come back to the project the second time run:

    .\\env\Scripts\activate
    

提交回复
热议问题