virtualenv won't activate on windows









up vote
12
down vote

favorite
4












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



I'm doing this inside of windows powershell through using



scriptsactivate


but get an error message




"cannot be loaded because the execution of scripts is disabled on this
system".




Could this be because I don't carry admin privileges on my computer?










share|improve this question

















  • 3




    According to Microsoft Tech Support, setting Execution Policy to unrestrictred should help. How to do that: Set-ExecutionPolicy Unrestricted -Force
    – Kamiccolo
    Sep 10 '13 at 7:47






  • 1




    @Kamiccolo AWESOME! You nailed it. Thanks for you help. Great first experience for me on stackoverflow. Thankyou!
    – SScode
    Sep 10 '13 at 8:07










  • Or, if you have git bash (or mingw) installed, you could just activate it there instead in command windows powershell/command prompt
    – quasoft
    Sep 21 '15 at 18:36










  • @Kamiccolo this worked for me on Windows 7 running Python 3. Thanks!
    – Mona Jalal
    Jul 18 '16 at 17:48










  • @MonaJalal With Python3 you should use built-in venv which doesn't have this issue at all.
    – Franklin Yu
    Sep 17 at 19:45














up vote
12
down vote

favorite
4












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



I'm doing this inside of windows powershell through using



scriptsactivate


but get an error message




"cannot be loaded because the execution of scripts is disabled on this
system".




Could this be because I don't carry admin privileges on my computer?










share|improve this question

















  • 3




    According to Microsoft Tech Support, setting Execution Policy to unrestrictred should help. How to do that: Set-ExecutionPolicy Unrestricted -Force
    – Kamiccolo
    Sep 10 '13 at 7:47






  • 1




    @Kamiccolo AWESOME! You nailed it. Thanks for you help. Great first experience for me on stackoverflow. Thankyou!
    – SScode
    Sep 10 '13 at 8:07










  • Or, if you have git bash (or mingw) installed, you could just activate it there instead in command windows powershell/command prompt
    – quasoft
    Sep 21 '15 at 18:36










  • @Kamiccolo this worked for me on Windows 7 running Python 3. Thanks!
    – Mona Jalal
    Jul 18 '16 at 17:48










  • @MonaJalal With Python3 you should use built-in venv which doesn't have this issue at all.
    – Franklin Yu
    Sep 17 at 19:45












up vote
12
down vote

favorite
4









up vote
12
down vote

favorite
4






4





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



I'm doing this inside of windows powershell through using



scriptsactivate


but get an error message




"cannot be loaded because the execution of scripts is disabled on this
system".




Could this be because I don't carry admin privileges on my computer?










share|improve this question













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



I'm doing this inside of windows powershell through using



scriptsactivate


but get an error message




"cannot be loaded because the execution of scripts is disabled on this
system".




Could this be because I don't carry admin privileges on my computer?







python virtualenv






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Sep 10 '13 at 7:35









SScode

8526




8526







  • 3




    According to Microsoft Tech Support, setting Execution Policy to unrestrictred should help. How to do that: Set-ExecutionPolicy Unrestricted -Force
    – Kamiccolo
    Sep 10 '13 at 7:47






  • 1




    @Kamiccolo AWESOME! You nailed it. Thanks for you help. Great first experience for me on stackoverflow. Thankyou!
    – SScode
    Sep 10 '13 at 8:07










  • Or, if you have git bash (or mingw) installed, you could just activate it there instead in command windows powershell/command prompt
    – quasoft
    Sep 21 '15 at 18:36










  • @Kamiccolo this worked for me on Windows 7 running Python 3. Thanks!
    – Mona Jalal
    Jul 18 '16 at 17:48










  • @MonaJalal With Python3 you should use built-in venv which doesn't have this issue at all.
    – Franklin Yu
    Sep 17 at 19:45












  • 3




    According to Microsoft Tech Support, setting Execution Policy to unrestrictred should help. How to do that: Set-ExecutionPolicy Unrestricted -Force
    – Kamiccolo
    Sep 10 '13 at 7:47






  • 1




    @Kamiccolo AWESOME! You nailed it. Thanks for you help. Great first experience for me on stackoverflow. Thankyou!
    – SScode
    Sep 10 '13 at 8:07










  • Or, if you have git bash (or mingw) installed, you could just activate it there instead in command windows powershell/command prompt
    – quasoft
    Sep 21 '15 at 18:36










  • @Kamiccolo this worked for me on Windows 7 running Python 3. Thanks!
    – Mona Jalal
    Jul 18 '16 at 17:48










  • @MonaJalal With Python3 you should use built-in venv which doesn't have this issue at all.
    – Franklin Yu
    Sep 17 at 19:45







3




3




According to Microsoft Tech Support, setting Execution Policy to unrestrictred should help. How to do that: Set-ExecutionPolicy Unrestricted -Force
– Kamiccolo
Sep 10 '13 at 7:47




According to Microsoft Tech Support, setting Execution Policy to unrestrictred should help. How to do that: Set-ExecutionPolicy Unrestricted -Force
– Kamiccolo
Sep 10 '13 at 7:47




1




1




@Kamiccolo AWESOME! You nailed it. Thanks for you help. Great first experience for me on stackoverflow. Thankyou!
– SScode
Sep 10 '13 at 8:07




@Kamiccolo AWESOME! You nailed it. Thanks for you help. Great first experience for me on stackoverflow. Thankyou!
– SScode
Sep 10 '13 at 8:07












Or, if you have git bash (or mingw) installed, you could just activate it there instead in command windows powershell/command prompt
– quasoft
Sep 21 '15 at 18:36




Or, if you have git bash (or mingw) installed, you could just activate it there instead in command windows powershell/command prompt
– quasoft
Sep 21 '15 at 18:36












@Kamiccolo this worked for me on Windows 7 running Python 3. Thanks!
– Mona Jalal
Jul 18 '16 at 17:48




@Kamiccolo this worked for me on Windows 7 running Python 3. Thanks!
– Mona Jalal
Jul 18 '16 at 17:48












@MonaJalal With Python3 you should use built-in venv which doesn't have this issue at all.
– Franklin Yu
Sep 17 at 19:45




@MonaJalal With Python3 you should use built-in venv which doesn't have this issue at all.
– Franklin Yu
Sep 17 at 19:45












7 Answers
7






active

oldest

votes

















up vote
31
down vote



accepted










Moving comment to answers section :)



According to Microsoft Tech Support it might be a problem with Execution Policy Settings. To fix it, You should try executing Set-ExecutionPolicy Unrestricted -Force in Your Power Shell.



NB: Remember to launch Power Shell as administrator.






share|improve this answer


















  • 6




    (for new readers) Also make sure you use ScriptsActivate.PS1
    – mak
    Jan 13 '15 at 19:24










  • This worked for me. Wanted to point out that I tried the directions in the embed at this link unsuccessfully: virtualenv.pypa.io/en/stable/userguide/#activate-script. I wonder if its just wrong or is there a difference somewhere.
    – ThatsAMorais
    May 31 '16 at 17:19







  • 1




    Or Set-ExecutionPolicy Unrestricted -Scope CurrentUser to use a non-administrative PowerShell.
    – mijiturka
    Jun 13 at 15:13

















up vote
2
down vote













Another quick solution i have found here (it is applicable for Windows Powershell only) is like this:



First run



Scriptscmd


Than run



Scriptsactivate.bat


At this position, your Virtualenv is activated. Now if you deactivate it and want to activate it again later in the same session of powershell, you just need to run-



Scriptsactivate


There is no need to cmd or activate.bat command later.






share|improve this answer
















  • 5




    There is no Scriptscmd for me.
    – renatov
    Jan 27 '16 at 16:04

















up vote
1
down vote













in windows you should activate the virtual environment by following command in cmd




E:your_environmentScripts>activate.bat




if the environment is activated then it show your environment name enclosed with bracket like this




(your_environment) E:your_environmentScripts>




Also we can ensure by checking with where.exe it will list our active python environment with order of hierarchy



 (your_environment) E:your_environmentScripts>where.exe python

E:your_environmentScriptspython.exe

C:Python27python.exe


if you need to deactivate then do




(your_environment) E:your_environmentScripts>deactivate.bat







share|improve this answer






















  • OP explicitly mentioned PowerShell, not CMD.
    – Franklin Yu
    Sep 17 at 19:47

















up vote
0
down vote













This worked for me:



You can simply open a normal (you do not need elevated access) cmd or powershell session (I use the embedded PS terminal in vscode) and type the following from the folder where the script file is e.g.: .venvScriptsActivate.ps1:



powershell.exe -executionpolicy unrestricted -command .Activate.ps1 -Scope CurrentUser



and then you can run the activate command after that.



Note: This will only allow that specific Script to run, and only by your logged in user.






share|improve this answer



























    up vote
    0
    down vote













    Set the ExcutionPolicy for the Process Scope
    after Yes [y]
    then type Scripts/activate



    enter image description here






    share|improve this answer





























      up vote
      0
      down vote













      To install a virtual environment in Windows Powershell only but to activate you'll need to run Windows powershell as Administrator



      1. pip install virtualenv

      2. virtualenv %Name of virtual environment%

      It is installed now to activate it, run powershell in as administrator



      1. Set-ExecutionPolicy Unrestricted -Force

      2. .envScriptsactivate

      To deactivate the environment



      1. .envScriptsdeactivate

      Hope it helps.



      For more help do visit the official page
      https://pypi.org/project/virtualenv/1.8.2/






      share|improve this answer





























        up vote
        0
        down vote













        If you don't want to change your computer's execution policy on windows like I do, you can use windows command prompt instead of windows powershell, and just need to run
        Scriptsactivate
        to activate your env






        share|improve this answer




















        • This doesn't solve the OP's problem because that's what the OP was originally trying...
          – Joel
          Nov 11 at 17:31










        • @Joel Uhm, cmd and powershell are two different environments. the execution rights that is limited in powershell doesn't get the same restriction when being used in cmd prompts. well at least for this "scriptsactivate"
          – ianNg
          Nov 11 at 18:51










        Your Answer






        StackExchange.ifUsing("editor", function ()
        StackExchange.using("externalEditor", function ()
        StackExchange.using("snippets", function ()
        StackExchange.snippets.init();
        );
        );
        , "code-snippets");

        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "1"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        convertImagesToLinks: true,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: 10,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f18713086%2fvirtualenv-wont-activate-on-windows%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        7 Answers
        7






        active

        oldest

        votes








        7 Answers
        7






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes








        up vote
        31
        down vote



        accepted










        Moving comment to answers section :)



        According to Microsoft Tech Support it might be a problem with Execution Policy Settings. To fix it, You should try executing Set-ExecutionPolicy Unrestricted -Force in Your Power Shell.



        NB: Remember to launch Power Shell as administrator.






        share|improve this answer


















        • 6




          (for new readers) Also make sure you use ScriptsActivate.PS1
          – mak
          Jan 13 '15 at 19:24










        • This worked for me. Wanted to point out that I tried the directions in the embed at this link unsuccessfully: virtualenv.pypa.io/en/stable/userguide/#activate-script. I wonder if its just wrong or is there a difference somewhere.
          – ThatsAMorais
          May 31 '16 at 17:19







        • 1




          Or Set-ExecutionPolicy Unrestricted -Scope CurrentUser to use a non-administrative PowerShell.
          – mijiturka
          Jun 13 at 15:13














        up vote
        31
        down vote



        accepted










        Moving comment to answers section :)



        According to Microsoft Tech Support it might be a problem with Execution Policy Settings. To fix it, You should try executing Set-ExecutionPolicy Unrestricted -Force in Your Power Shell.



        NB: Remember to launch Power Shell as administrator.






        share|improve this answer


















        • 6




          (for new readers) Also make sure you use ScriptsActivate.PS1
          – mak
          Jan 13 '15 at 19:24










        • This worked for me. Wanted to point out that I tried the directions in the embed at this link unsuccessfully: virtualenv.pypa.io/en/stable/userguide/#activate-script. I wonder if its just wrong or is there a difference somewhere.
          – ThatsAMorais
          May 31 '16 at 17:19







        • 1




          Or Set-ExecutionPolicy Unrestricted -Scope CurrentUser to use a non-administrative PowerShell.
          – mijiturka
          Jun 13 at 15:13












        up vote
        31
        down vote



        accepted







        up vote
        31
        down vote



        accepted






        Moving comment to answers section :)



        According to Microsoft Tech Support it might be a problem with Execution Policy Settings. To fix it, You should try executing Set-ExecutionPolicy Unrestricted -Force in Your Power Shell.



        NB: Remember to launch Power Shell as administrator.






        share|improve this answer














        Moving comment to answers section :)



        According to Microsoft Tech Support it might be a problem with Execution Policy Settings. To fix it, You should try executing Set-ExecutionPolicy Unrestricted -Force in Your Power Shell.



        NB: Remember to launch Power Shell as administrator.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Sep 17 at 19:41









        Franklin Yu

        2,70811832




        2,70811832










        answered Sep 10 '13 at 8:15









        Kamiccolo

        4,19512835




        4,19512835







        • 6




          (for new readers) Also make sure you use ScriptsActivate.PS1
          – mak
          Jan 13 '15 at 19:24










        • This worked for me. Wanted to point out that I tried the directions in the embed at this link unsuccessfully: virtualenv.pypa.io/en/stable/userguide/#activate-script. I wonder if its just wrong or is there a difference somewhere.
          – ThatsAMorais
          May 31 '16 at 17:19







        • 1




          Or Set-ExecutionPolicy Unrestricted -Scope CurrentUser to use a non-administrative PowerShell.
          – mijiturka
          Jun 13 at 15:13












        • 6




          (for new readers) Also make sure you use ScriptsActivate.PS1
          – mak
          Jan 13 '15 at 19:24










        • This worked for me. Wanted to point out that I tried the directions in the embed at this link unsuccessfully: virtualenv.pypa.io/en/stable/userguide/#activate-script. I wonder if its just wrong or is there a difference somewhere.
          – ThatsAMorais
          May 31 '16 at 17:19







        • 1




          Or Set-ExecutionPolicy Unrestricted -Scope CurrentUser to use a non-administrative PowerShell.
          – mijiturka
          Jun 13 at 15:13







        6




        6




        (for new readers) Also make sure you use ScriptsActivate.PS1
        – mak
        Jan 13 '15 at 19:24




        (for new readers) Also make sure you use ScriptsActivate.PS1
        – mak
        Jan 13 '15 at 19:24












        This worked for me. Wanted to point out that I tried the directions in the embed at this link unsuccessfully: virtualenv.pypa.io/en/stable/userguide/#activate-script. I wonder if its just wrong or is there a difference somewhere.
        – ThatsAMorais
        May 31 '16 at 17:19





        This worked for me. Wanted to point out that I tried the directions in the embed at this link unsuccessfully: virtualenv.pypa.io/en/stable/userguide/#activate-script. I wonder if its just wrong or is there a difference somewhere.
        – ThatsAMorais
        May 31 '16 at 17:19





        1




        1




        Or Set-ExecutionPolicy Unrestricted -Scope CurrentUser to use a non-administrative PowerShell.
        – mijiturka
        Jun 13 at 15:13




        Or Set-ExecutionPolicy Unrestricted -Scope CurrentUser to use a non-administrative PowerShell.
        – mijiturka
        Jun 13 at 15:13












        up vote
        2
        down vote













        Another quick solution i have found here (it is applicable for Windows Powershell only) is like this:



        First run



        Scriptscmd


        Than run



        Scriptsactivate.bat


        At this position, your Virtualenv is activated. Now if you deactivate it and want to activate it again later in the same session of powershell, you just need to run-



        Scriptsactivate


        There is no need to cmd or activate.bat command later.






        share|improve this answer
















        • 5




          There is no Scriptscmd for me.
          – renatov
          Jan 27 '16 at 16:04














        up vote
        2
        down vote













        Another quick solution i have found here (it is applicable for Windows Powershell only) is like this:



        First run



        Scriptscmd


        Than run



        Scriptsactivate.bat


        At this position, your Virtualenv is activated. Now if you deactivate it and want to activate it again later in the same session of powershell, you just need to run-



        Scriptsactivate


        There is no need to cmd or activate.bat command later.






        share|improve this answer
















        • 5




          There is no Scriptscmd for me.
          – renatov
          Jan 27 '16 at 16:04












        up vote
        2
        down vote










        up vote
        2
        down vote









        Another quick solution i have found here (it is applicable for Windows Powershell only) is like this:



        First run



        Scriptscmd


        Than run



        Scriptsactivate.bat


        At this position, your Virtualenv is activated. Now if you deactivate it and want to activate it again later in the same session of powershell, you just need to run-



        Scriptsactivate


        There is no need to cmd or activate.bat command later.






        share|improve this answer












        Another quick solution i have found here (it is applicable for Windows Powershell only) is like this:



        First run



        Scriptscmd


        Than run



        Scriptsactivate.bat


        At this position, your Virtualenv is activated. Now if you deactivate it and want to activate it again later in the same session of powershell, you just need to run-



        Scriptsactivate


        There is no need to cmd or activate.bat command later.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered May 23 '15 at 13:41









        ni8mr

        66511132




        66511132







        • 5




          There is no Scriptscmd for me.
          – renatov
          Jan 27 '16 at 16:04












        • 5




          There is no Scriptscmd for me.
          – renatov
          Jan 27 '16 at 16:04







        5




        5




        There is no Scriptscmd for me.
        – renatov
        Jan 27 '16 at 16:04




        There is no Scriptscmd for me.
        – renatov
        Jan 27 '16 at 16:04










        up vote
        1
        down vote













        in windows you should activate the virtual environment by following command in cmd




        E:your_environmentScripts>activate.bat




        if the environment is activated then it show your environment name enclosed with bracket like this




        (your_environment) E:your_environmentScripts>




        Also we can ensure by checking with where.exe it will list our active python environment with order of hierarchy



         (your_environment) E:your_environmentScripts>where.exe python

        E:your_environmentScriptspython.exe

        C:Python27python.exe


        if you need to deactivate then do




        (your_environment) E:your_environmentScripts>deactivate.bat







        share|improve this answer






















        • OP explicitly mentioned PowerShell, not CMD.
          – Franklin Yu
          Sep 17 at 19:47














        up vote
        1
        down vote













        in windows you should activate the virtual environment by following command in cmd




        E:your_environmentScripts>activate.bat




        if the environment is activated then it show your environment name enclosed with bracket like this




        (your_environment) E:your_environmentScripts>




        Also we can ensure by checking with where.exe it will list our active python environment with order of hierarchy



         (your_environment) E:your_environmentScripts>where.exe python

        E:your_environmentScriptspython.exe

        C:Python27python.exe


        if you need to deactivate then do




        (your_environment) E:your_environmentScripts>deactivate.bat







        share|improve this answer






















        • OP explicitly mentioned PowerShell, not CMD.
          – Franklin Yu
          Sep 17 at 19:47












        up vote
        1
        down vote










        up vote
        1
        down vote









        in windows you should activate the virtual environment by following command in cmd




        E:your_environmentScripts>activate.bat




        if the environment is activated then it show your environment name enclosed with bracket like this




        (your_environment) E:your_environmentScripts>




        Also we can ensure by checking with where.exe it will list our active python environment with order of hierarchy



         (your_environment) E:your_environmentScripts>where.exe python

        E:your_environmentScriptspython.exe

        C:Python27python.exe


        if you need to deactivate then do




        (your_environment) E:your_environmentScripts>deactivate.bat







        share|improve this answer














        in windows you should activate the virtual environment by following command in cmd




        E:your_environmentScripts>activate.bat




        if the environment is activated then it show your environment name enclosed with bracket like this




        (your_environment) E:your_environmentScripts>




        Also we can ensure by checking with where.exe it will list our active python environment with order of hierarchy



         (your_environment) E:your_environmentScripts>where.exe python

        E:your_environmentScriptspython.exe

        C:Python27python.exe


        if you need to deactivate then do




        (your_environment) E:your_environmentScripts>deactivate.bat








        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Jan 15 at 22:21

























        answered Jan 15 at 22:01









        Janarthanan Ramu

        721813




        721813











        • OP explicitly mentioned PowerShell, not CMD.
          – Franklin Yu
          Sep 17 at 19:47
















        • OP explicitly mentioned PowerShell, not CMD.
          – Franklin Yu
          Sep 17 at 19:47















        OP explicitly mentioned PowerShell, not CMD.
        – Franklin Yu
        Sep 17 at 19:47




        OP explicitly mentioned PowerShell, not CMD.
        – Franklin Yu
        Sep 17 at 19:47










        up vote
        0
        down vote













        This worked for me:



        You can simply open a normal (you do not need elevated access) cmd or powershell session (I use the embedded PS terminal in vscode) and type the following from the folder where the script file is e.g.: .venvScriptsActivate.ps1:



        powershell.exe -executionpolicy unrestricted -command .Activate.ps1 -Scope CurrentUser



        and then you can run the activate command after that.



        Note: This will only allow that specific Script to run, and only by your logged in user.






        share|improve this answer
























          up vote
          0
          down vote













          This worked for me:



          You can simply open a normal (you do not need elevated access) cmd or powershell session (I use the embedded PS terminal in vscode) and type the following from the folder where the script file is e.g.: .venvScriptsActivate.ps1:



          powershell.exe -executionpolicy unrestricted -command .Activate.ps1 -Scope CurrentUser



          and then you can run the activate command after that.



          Note: This will only allow that specific Script to run, and only by your logged in user.






          share|improve this answer






















            up vote
            0
            down vote










            up vote
            0
            down vote









            This worked for me:



            You can simply open a normal (you do not need elevated access) cmd or powershell session (I use the embedded PS terminal in vscode) and type the following from the folder where the script file is e.g.: .venvScriptsActivate.ps1:



            powershell.exe -executionpolicy unrestricted -command .Activate.ps1 -Scope CurrentUser



            and then you can run the activate command after that.



            Note: This will only allow that specific Script to run, and only by your logged in user.






            share|improve this answer












            This worked for me:



            You can simply open a normal (you do not need elevated access) cmd or powershell session (I use the embedded PS terminal in vscode) and type the following from the folder where the script file is e.g.: .venvScriptsActivate.ps1:



            powershell.exe -executionpolicy unrestricted -command .Activate.ps1 -Scope CurrentUser



            and then you can run the activate command after that.



            Note: This will only allow that specific Script to run, and only by your logged in user.







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Aug 6 at 14:29









            Elmo

            19619




            19619




















                up vote
                0
                down vote













                Set the ExcutionPolicy for the Process Scope
                after Yes [y]
                then type Scripts/activate



                enter image description here






                share|improve this answer


























                  up vote
                  0
                  down vote













                  Set the ExcutionPolicy for the Process Scope
                  after Yes [y]
                  then type Scripts/activate



                  enter image description here






                  share|improve this answer
























                    up vote
                    0
                    down vote










                    up vote
                    0
                    down vote









                    Set the ExcutionPolicy for the Process Scope
                    after Yes [y]
                    then type Scripts/activate



                    enter image description here






                    share|improve this answer














                    Set the ExcutionPolicy for the Process Scope
                    after Yes [y]
                    then type Scripts/activate



                    enter image description here







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Sep 17 at 19:40









                    Franklin Yu

                    2,70811832




                    2,70811832










                    answered Jan 10 '17 at 8:32









                    Adil Siddiqui

                    11




                    11




















                        up vote
                        0
                        down vote













                        To install a virtual environment in Windows Powershell only but to activate you'll need to run Windows powershell as Administrator



                        1. pip install virtualenv

                        2. virtualenv %Name of virtual environment%

                        It is installed now to activate it, run powershell in as administrator



                        1. Set-ExecutionPolicy Unrestricted -Force

                        2. .envScriptsactivate

                        To deactivate the environment



                        1. .envScriptsdeactivate

                        Hope it helps.



                        For more help do visit the official page
                        https://pypi.org/project/virtualenv/1.8.2/






                        share|improve this answer


























                          up vote
                          0
                          down vote













                          To install a virtual environment in Windows Powershell only but to activate you'll need to run Windows powershell as Administrator



                          1. pip install virtualenv

                          2. virtualenv %Name of virtual environment%

                          It is installed now to activate it, run powershell in as administrator



                          1. Set-ExecutionPolicy Unrestricted -Force

                          2. .envScriptsactivate

                          To deactivate the environment



                          1. .envScriptsdeactivate

                          Hope it helps.



                          For more help do visit the official page
                          https://pypi.org/project/virtualenv/1.8.2/






                          share|improve this answer
























                            up vote
                            0
                            down vote










                            up vote
                            0
                            down vote









                            To install a virtual environment in Windows Powershell only but to activate you'll need to run Windows powershell as Administrator



                            1. pip install virtualenv

                            2. virtualenv %Name of virtual environment%

                            It is installed now to activate it, run powershell in as administrator



                            1. Set-ExecutionPolicy Unrestricted -Force

                            2. .envScriptsactivate

                            To deactivate the environment



                            1. .envScriptsdeactivate

                            Hope it helps.



                            For more help do visit the official page
                            https://pypi.org/project/virtualenv/1.8.2/






                            share|improve this answer














                            To install a virtual environment in Windows Powershell only but to activate you'll need to run Windows powershell as Administrator



                            1. pip install virtualenv

                            2. virtualenv %Name of virtual environment%

                            It is installed now to activate it, run powershell in as administrator



                            1. Set-ExecutionPolicy Unrestricted -Force

                            2. .envScriptsactivate

                            To deactivate the environment



                            1. .envScriptsdeactivate

                            Hope it helps.



                            For more help do visit the official page
                            https://pypi.org/project/virtualenv/1.8.2/







                            share|improve this answer














                            share|improve this answer



                            share|improve this answer








                            edited Sep 21 at 11:23

























                            answered Sep 21 at 10:48









                            Amit Gupta

                            887




                            887




















                                up vote
                                0
                                down vote













                                If you don't want to change your computer's execution policy on windows like I do, you can use windows command prompt instead of windows powershell, and just need to run
                                Scriptsactivate
                                to activate your env






                                share|improve this answer




















                                • This doesn't solve the OP's problem because that's what the OP was originally trying...
                                  – Joel
                                  Nov 11 at 17:31










                                • @Joel Uhm, cmd and powershell are two different environments. the execution rights that is limited in powershell doesn't get the same restriction when being used in cmd prompts. well at least for this "scriptsactivate"
                                  – ianNg
                                  Nov 11 at 18:51














                                up vote
                                0
                                down vote













                                If you don't want to change your computer's execution policy on windows like I do, you can use windows command prompt instead of windows powershell, and just need to run
                                Scriptsactivate
                                to activate your env






                                share|improve this answer




















                                • This doesn't solve the OP's problem because that's what the OP was originally trying...
                                  – Joel
                                  Nov 11 at 17:31










                                • @Joel Uhm, cmd and powershell are two different environments. the execution rights that is limited in powershell doesn't get the same restriction when being used in cmd prompts. well at least for this "scriptsactivate"
                                  – ianNg
                                  Nov 11 at 18:51












                                up vote
                                0
                                down vote










                                up vote
                                0
                                down vote









                                If you don't want to change your computer's execution policy on windows like I do, you can use windows command prompt instead of windows powershell, and just need to run
                                Scriptsactivate
                                to activate your env






                                share|improve this answer












                                If you don't want to change your computer's execution policy on windows like I do, you can use windows command prompt instead of windows powershell, and just need to run
                                Scriptsactivate
                                to activate your env







                                share|improve this answer












                                share|improve this answer



                                share|improve this answer










                                answered Nov 11 at 17:06









                                ianNg

                                1




                                1











                                • This doesn't solve the OP's problem because that's what the OP was originally trying...
                                  – Joel
                                  Nov 11 at 17:31










                                • @Joel Uhm, cmd and powershell are two different environments. the execution rights that is limited in powershell doesn't get the same restriction when being used in cmd prompts. well at least for this "scriptsactivate"
                                  – ianNg
                                  Nov 11 at 18:51
















                                • This doesn't solve the OP's problem because that's what the OP was originally trying...
                                  – Joel
                                  Nov 11 at 17:31










                                • @Joel Uhm, cmd and powershell are two different environments. the execution rights that is limited in powershell doesn't get the same restriction when being used in cmd prompts. well at least for this "scriptsactivate"
                                  – ianNg
                                  Nov 11 at 18:51















                                This doesn't solve the OP's problem because that's what the OP was originally trying...
                                – Joel
                                Nov 11 at 17:31




                                This doesn't solve the OP's problem because that's what the OP was originally trying...
                                – Joel
                                Nov 11 at 17:31












                                @Joel Uhm, cmd and powershell are two different environments. the execution rights that is limited in powershell doesn't get the same restriction when being used in cmd prompts. well at least for this "scriptsactivate"
                                – ianNg
                                Nov 11 at 18:51




                                @Joel Uhm, cmd and powershell are two different environments. the execution rights that is limited in powershell doesn't get the same restriction when being used in cmd prompts. well at least for this "scriptsactivate"
                                – ianNg
                                Nov 11 at 18:51

















                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Stack Overflow!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.





                                Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


                                Please pay close attention to the following guidance:


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f18713086%2fvirtualenv-wont-activate-on-windows%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                這個網誌中的熱門文章

                                How to read a connectionString WITH PROVIDER in .NET Core?

                                Node.js Script on GitHub Pages or Amazon S3

                                Museum of Modern and Contemporary Art of Trento and Rovereto