-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVirtualenv.py
More file actions
executable file
·44 lines (23 loc) · 821 Bytes
/
Virtualenv.py
File metadata and controls
executable file
·44 lines (23 loc) · 821 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
'''
1. pip install virtualenv
mkdir "dr name "
cd directory
virtualenv project1_env # name of the project environment
source project1_env/bin/activate / for activating the env.
which pip \\ or which python.
pip list .
pip install (packages name ).
pip freeze --local > requirement.txt # it takes only local dependencies
cat requirement.txt .
//getting out of the environment
deactivate
rm -rf project1_env #deleting the environment permanetly
\\ making the env with the project name
virtualenv -p /usr/bin/python3.10 project2_env
# activating
source py26_env/bin/activate .
/you can switch between poject by activaiting and deactiavate
'''
# creating the conda environment in the conda
# conda create --name my_app flask sqlalchemy
#conda create --name my_app27 python=2.7 flask sqlalchemy