virtualenv my_python_env
I was able to create a virtual environment directory by typing,
.\my_python_env\Scripts\activate.bat
Even if you try to activate by hitting
.\my_python_env\Scripts\activate.bat : The term '.\my_python_env\Scripts\activate.bat' is not recognized as the name of a cmdlet,
PS C:\Users\--\Documents\programming\Sakai\my_python_env\Scripts> cd..
PS C:\Users\--\Documents\programming\Sakai\my_python_env> .\Scripts\activate.bat
PS C:\Users\--\Documents\programming\Sakai\my_python_env> .\Scripts\activate.bat
PS C:\Users\--\Documents\programming\Sakai\my_python_env> .\Scripts\activate.bat
PS C:\Users\--\Documents\programming\Sakai\my_python_env> .\Scripts\activate.bat
PS C:\Users\--\Documents\programming\Sakai\my_python_env> cd..
PS C:\Users\--\Documents\programming\Sakai> cd .\my_python_env\
PS C:\Users\--\Documents\programming\Sakai\my_python_env> .\Scripts\activate
.\Scripts\activate : File C:\Users\--\Documents\programming\Sakai\my_python_env\Scripts\activate.ps1 cannot be loaded
because running scripts is disabled on this system. For more information, see about_Execution_Policies at
https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
+ .\Scripts\activate
+ ~~~~~~~~~~~~~~~~~~
+ CategoryInfo : SecurityError: (:) [], PSSecurityException
+ FullyQualifiedErrorId : UnauthorizedAccess
I get an error like that and it doesn't work. Even if I looked it up, I couldn't understand the reason and was in great trouble.
It really happened, but when I changed the default shell from powershell to command prompt, it was solved normally. I don't know why at all, but I'll share it for those who have the same problem and don't understand why. I will update it again when I understand the reason.
Recommended Posts