-
Notifications
You must be signed in to change notification settings - Fork 0
/
pythonenvi.html
36 lines (29 loc) · 1.66 KB
/
pythonenvi.html
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
<html>
<head>
<title>Python environment</title>
<style>
h1 {text-align: center; color: tomato; font-size:60px;}
h2 {text-align: left; color: black; font-size:40px;}
h2 {text-align: left; color: black; font-size:30px;}
h3 {text-align: center; color: black; font-size:18px;}
p {text-align: left; color: black; font-size:18px;}
img {display: block; margin-left: auto; margin-right: auto;}
footer {text-align: center; color: grey;}
</style>
</head>
<body>
<h1>Python virtual environment</h1>
<h3>Create date: May 5 2024</h3>
<p>Go back to the main page <a href="index.html" target="_self">View</a></p>
<p> A virtual environment makes modules or packages to be installed confidently and not interfere with another project’s environment. Using following command to create a virtual environment: </p>
<p style="background-color:grey;">python3 -m venv envname</p>
<p> This will create a virtual environment named "envame", which includes basic packages for the environment. Activate this environment, staying in "bin" directory and using following command: </p>
<p style="background-color:grey;"> source activate </p>
<p> After activating your virtual environment, the environment name will be shown in front of your command line. In order to add new modules in this environment, use pre-installed "pip" or "pip3":</p>
<p style="background-color:grey;"> python3 -m pip install modulename </p>
<p> To deactivate the virtual environment, run the command: </p>
<p style="background-color:grey;"> deactivate </p>
<img src="IMG/pythonenvi.jpg" alt="airsea" style="width:800px;">
<footer>How to activate and deactivate environment.</footer>
</body>
</html>