python source activate code example

Example 1: how to activate venv python

python3 -m venv tutorial-env

Example 2: activate environment python

$ source env/bin/activate
(env) $

Example 3: how to activate python virtual environment

#open directory with terminal where you crated vertual environment
#example your venv name <visualscrapy>
teamspirit:~$ cd visualscrapy
#teamspirit:~/visualscrapy$  <-- output
#Now type bellow command
source ./bin/activate
#(visualscrapy) teamspirit:~/visualscrapy$   <-- output

Example 4: activate environment python

$ source env/bin/activate
(env) $ which python
/Users/michaelherman/python-virtual-environments/env/bin/python

Example 5: python activate virtual environment

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope Process