I created a virtualenv around my project, but when I try to activate it I cannot. It might just be syntax or folder location, but I am stumped right now.
You can see
if you already cd your project type only in windows 10
Scripts/activate
That works for me:)
In Windows platform,
you should use this command with path specified where you have installed a virtual environment.
$ .\env\Scripts\activate
By this, You should be able to activate this on windows.
If some beginner, like me, has followed multiple Python tutorials now possible has multiple Python versions and/or multiple versions of pip/virtualenv/pipenv...
In that case, answers listed, while many correct, might not help.
The first thing I would try in your place is uninstall and reinstall Python and go from there.
A small reminder, but I had my slashes the wrong way on Win10 cmd. According to python documentation the activate command is: C:\> <venv>\Scripts\activate.bat
When you're browsing directories it's e.g. cd .env/Scripts
So to create my venv I used python -m venv --copies .env
and to activate .env\Scripts\activate.bat
Ensure venv is there and just follow the commands below. It works in Windows 10.
Go to the path where you want your virtual enviroments to reside:
> cd <my_venv_path>
Create the virtual environment named "env":
> python -m venv env
Add the path to the git ignore file (optional):
> echo env/ >> .gitignore
Activate the virtual env:
> .\env\Scripts\activate
open the folder with any gitbash console. for example using visualCode and Gitbash console program: 1)Install Gitbash for windows
2) using VisualCode IDE, right click over the project open in terminal console option
3) on window console in Visualcode, looking for a Select->default shell and change it for Gitbash
4)now your project is open with bash console and right path, put source ./Scripts/activate
btw : . with blank space = source