Open dudung opened 1 month ago
Ahmad Royyan Fatah - 10222065
Muhammad Kamal (10222087)
A: In the top image, the pip list
command only shows the package pip
with version 24.0. In the bottom image, there is a difference in the package, butiran 0.0.9
and pip 24.0
. This difference indicates that the bottom image is run in a virtual environment because of the (butiran)
indicator before the command prompt.
A: The differences can exist because of Python virtual environment. The virtual environment is an isolated environment from the global environment. The bottom image shows the virtual environment condition in which the environment contains its own packages (butiran
and pip
).
A: butiran
A: Yes, the name is free to choose when creating it, indicated by the command:
python -m venv <name>
A: As far no hardware concerns and limitation, there is no limit on how many virtual environment can be created on computer and the virual environment can be created as many as needed. This can be done because virtual environment is just a directory creation with isolated Python libraries from the global environment.
pip list
command?A: The command displays a list of installed Packages in the current environments with explanation of their version. Example:
(tf) V:\>pip list
Package Version
---------------- -------
contourpy 1.2.1
cycler 0.12.1
fonttools 4.51.0
kiwisolver 1.4.5
matplotlib 3.8.4
mpmath 1.3.0
numpy 1.26.4
packaging 24.0
pandas 2.2.2
pillow 10.3.0
pip 24.0
pyparsing 3.1.2
python-dateutil 2.9.0.post0
pytz 2024.1
scipy 1.13.0
six 1.16.0
sympy 1.12
tzdata 2024.1
pip freeze
command?A: The command will output installed Python packages and their version using a format that is typically used for creating requirements.txt
. This command can be helpful for saving, sharing, or duplicating environments with the same exact packages. Example:
stack-data==0.6.3
sympy==1.12
tensorboard==2.16.2
tensorboard-data-server==0.7.2
tensorflow==2.16.1
tensorflow-intel==2.16.1
termcolor==2.4.0
terminado==0.18.1
threadpoolctl==3.5.0
tinycss2==1.3.0
tornado==6.4
traitlets==5.14.3
types-python-dateutil==2.9.0.20240316
typing_extensions==4.11.0
tzdata==2024.1
uri-template==1.3.0
urllib3==2.2.1
wcwidth==0.2.13
webcolors==1.13
webencodings==0.5.1
websocket-client==1.8.0
Werkzeug==3.0.3
wheel==0.43.0
widgetsnbextension==4.0.10
wrapt==1.16.0
> requirements.txt
after pip freeze
?A: Based on the previous question, the purpose of > requirements.txt
after pip freeze
is used to put the output of pip freeze
to a file named requirements.txt
. This file can later be used for sharing or duplicating environments with the same exact packages using:
pip install -r requirements.txt
requirements.txt
be used?A: Using the standard other people use, the file name requirements.txt
is a widely used "defacto" name. But, other names can be used instead of requirements.txt
but this might be tricky for others to understand. We can use any other name, but
pip install -r
must reference the specific file name you choose.
A: Using the command:
pip freeze > requirements.txt
and
pip install -r requirements.txt
we can clone or replicate virtual environment. We can do this process to get the exact package versions and dependencies in the requirements.txt
file. This process allows the same environment to be recreated on another computer or virtual environment by installing those exact versions of packages.
Ahmad Haffiz Fildzah (10222001)
Ilham Ghufroni (10221012)
Explain the differences in previous slide.
Answer:
The difference between the two command prompts is primarily related to the Python environment they are running in. The first prompt runs in the system environment, while the second runs in a virtual environment. The second environment contains an additional package (butiran 0.0.9)
that is not present in the system environment.
Why can the differences exist? Explain in brief.
Answer:
System Environment vs. Virtual Environment:
The system environment C:\>py -m pip list
includes installed packages available to all Python projects, while a virtual environment (butiran) V:\>pip list
isolates packages for a specific project.
Package Isolation:
Virtual environments are used to avoid conflicts between dependencies for different projects. In the virtual environment (butiran)
, the package butiran 0.0.9
is installed, while it's not in the global system environment.
What is the name of virtual environment?
Answer:
butiran, as indicated by (butiran)
in the second command prompt.
Is the name free to choose?
Answer:
Yes, the name of a virtual environment is free to choose. When creating a virtual environment using a command like python
-m venv <name>
How many virtual environments are allowed in a computer? Answer: There is no limit to how many virtual environments you can create on a computer. The only constraints are your available storage space and the ease of managing them. Each virtual environment takes up some storage, so the number you can have depends on your system's capacity.
What is the purpose of pip list
command?
Answer:
Used to display a list of all the Python packages installed in the current environment, along with their versions. It helps users check which packages are available and their respective versions, whether in the system environment or virtual environment.
What is the purpose of pip freeze
command?
Answer:
The pip freeze command outputs a list of installed Python packages and their versions in a format that can be easily used for creating a requirements.txt
file. This file is often used to document the exact versions of dependencies required for a project, allowing others to replicate the same environment by running pip install -r requirements.txt
.
What is the purpose of > requirements.txt
after pip freeze
?
Answer:
Used to redirect the output of the pip freeze command into a file named requirements.txt
. This file will contain a list of all installed packages and their versions in the current environment, formatted in a way that can be used later for installing the exact same dependencies using the command pip install -r requirements.txt
.
Can another name instead of requirements.txt
be used?
Answer:
Yes, we can change them, the name is not fixed.
Why is that a process of cloning a virtual environment? Answer: Cloning a virtual environment involves creating an exact copy of an existing environment, including its packages and settings. This process is useful for ensuring consistency across different setups, testing changes without affecting the original environment, and creating backups.
Assignment 02: Software and Platform Installation
1. Python Packages The difference between both picture lies in the installed packages.
pip 24.0
. butiran 0.0.9
in addition to pip 24.0
. 2. Global vs Virtual Environment
The reason for the difference shown in the previous question lies in its environment difference. The first picture shows the packages installed in the global environment, indicated by the command C:/>py -m pip list
, whereas the second picture shows the packages installed in the virtual environment, indicated by the prefix (butiran) in the line (butiran) V:\>pip list
. Virtual environment is an isolated Python environtment that allows you to install packages without affecting the global environtment, which is why the package butiran 0.0.9
is only present in the second picture.
3. 'Butiran' Virtual Environment
As indicated by the word inside the parentheses, the virtual environment is called butiran
.
4. Limitations in Naming Virtual Environment There is no limitations in naming a virtual environment. You can name it to your liking.
5. Limitations in the Amount of Virtual Environtment on A Computer There is also no exact limit in how many virtual environments one can have in a computer. You can have many virtual environtments, providing that there are still available disk space and it does not affect the system performance.
6. Command to Create A List of All Installed Python Packages
The command pip list
is used to display a list of all installed python packages in the current environment, be it global or virtual, along with its version information. This can be beneficial for troubleshooting, where you can use the command to see all the packages and ensure they match the project's requirements.
7. Command to Create A Shareable List of All Installed Python Packages
Much like pip list
mentioned earlier, pip freeze
is a command that generates a list of installed Python packages and their versions. However, the list is made purposely in a way that can be easily shared. This allows the environtment to be easily reproduced, making it easier when working with teams.
8. Directing the Output of pip freeze
to the file requirements.txt
Using > requirements.txt
, the output created by pip freeze
will be listed in a .txt format file named requirements.txt
.
9. Custom pip freeze
File Title
Like naming environment, the title of the file to store pip freeze
output is also customizable. However, requirements.txt
has been the standard for Python projects, and it is best to name it as such to make it easier for other Python developer to identify.
10. Cloned Environment is A Virtual Environment, Because.... When you clone an environment, this new environment is an isolated replica of the previous environment. It has the same specific dependencies and configurations as the previous one, but it is an environment separated from the system's global Python environment.
1.Explain the differences in previous slide The differences between that slide is about the global environment and the virtual environment.
2. Why the differences can exist? Explain in brief.
A virtual environment allows you to isolate dependencies for specific projects, which is why the butiran
package is listed in the second environment but not in the first one. The first image represents the global environment, while the second one is within a virtual environment.
3.What is the name of virtual environment?
butiran
4.Is the name free to choose?
Yes it is, the name of the virtual environment is completely customizable. We can choose any name when creating it, using a command like py -m venv <name>
.
5.How many virtual environment are allowed in a computer? There is no limit to the number of virtual environments we can create on a computer. We can create as many virtual environments as needed.
6.What is the purpose of pip list
command?
The pip list
command shows a list of all installed Python packages in our current environment, along with their versions. It is used to check which packages are installed.
7.What is the purpose of pip freeze
command?
The pip freeze
command generates a list of installed packages and their specific versions in a format that is suitable for creating a requirements file. It captures the exact package versions, which helps replicate the environment later.
8.What is the purpose of > requirements.txt
after pip freeze?
Running pip freeze > requirements.txt
saves the list of installed packages and their versions to a file named requirements.txt.
This file can be shared with others to recreate the same environment by installing the packages listed inside.
9. Can other name instead of requirements.txt be used?
Yes, any file name can be used instead of requirements.txt
. For example, we can use pip freeze > contoh.txt.
When installing from this file, we can use pip install -r contoh.txt.
The name requirements.txt
is just a convention, not a rule.
10. Why is that a process of cloning a virtual environment? Because by cloning the virtual environment, we will create a new virtual environment with the same settings as the previous virtual environment, so it won't take time to install the libraries one by one.
10222109 - Jonathan Lijaya
Terdapat perbedaan antara kedua foto tersebut, pada foto bagian atas menunjukkan command prompt yang berada dalam global environment, sedangkan pada foto bagian bawah menunjukkan command prompt yang berada dalam virtual environment.
Perbedaan yang terdapat antara kedua foto tersebut disebabkan karena kondisi environment yang berbeda, dimana pada foto bagian bawah memiliki virtual environment dengan tambahan package 'butiran'. Virtual environment merupakan sebuah lingkungan terisolasi yang dijalankan secara independen tanpa menganggu global environment pada Python.
Nama dari virtual environment tersebut adalah 'butiran'.
Iya, sangat bebas untuk menentukan nama dari virtual environment.
Tidak terdapat batasan untuk membuat virtual environment, bisa dalam jumlah yang sangat banyak asalkan komputer yang dimiliki memiliki ruang storage yang dapat menampung seluruh virtual environment yang ingin dibuat.
Pip list adalah perintah pada command prompt yang digunakan untuk menampilkan seluruh package list yang telah diinstall dalam global environment ataupun virtual environment.
Pip freeze adalah perintah pada command prompt yang digunakan untuk menampilkan seluruh package list yang telah diinstall dalam format yang digunakan untuk dimasukkan ke dalam file requirements.txt.
Fungsi requirements.txt setelah pip freeze adalah untuk mengarahkan output dari command pip freeze ke dalam file requirements.txt. File tersebut berisi semua package list yang telah diinstall dalam environment yang digunakan.
Iya, bisa menggunakan nama apa saja selain requirements.txt, tetapi penggunaan nama requirements.txt sangat umum digunakan oleh para developer sehingga dapat memudahkan orang lain.
Mengkloning sebuah virtual environment memerlukan salinan yang sama persis dari environment yang sudah ada, termasuk package dan system settings didalamnya. Proses kloning digunakan untuk memastikan pengaturan yang berjalan aktif, menguji perubahan tanpa memengaruhi environment lain, dan membuat tempat cadangan.
Muhammad Syamsuddiin (10223075)
Eliza Putri Hapsani (10222103)
pip 24.0 version
, and the command wasn’t run in a virtual environment. Whereas, the second image has two installed packages: butiran 0.0.9 version
and pip 24.0 version
, and the command was run in a butiran
virtual environment because there’s a text (butiran)
before the command prompts.pip 24.0 version
) in the first image of command prompt, while in the second image the user installed the additional package (butiran)
and activated it as a virtual environment.butiran
.pip list
command is to make a list of the installed packages and each versions.pip freeze
command is to save the list of all the installed packages along with their versions in current environment.>requirements.txt
after pip freeze
is as a file where all the installed packages and their versions is saved so that it can be used to recreate/clone the same virtual environment elsewhere.requirements.txt
. It's free to choose.Pertanyaan: 1.Explain the differences in previous slide! 2.Why the differences can exist? Explain in brief! 3.What is the name of virtual environment? 4.Is the name free to choose? 5.How many virtual environment are allowed in a computer? 6.What is the purpose of pip listcommand? 7.What is the purpose of pip freezecommand? 8.What is the purpose of > requirements.txtafter pip freeze? 9.Can other name instead of requirements.txtbe used? 10.Why is that a process of cloning a virtual environment?
Jawaban:
py -m pip list
berarti kita harus memanggil dulu python dgn syntax "py" (manggil python secara langsung, syntax nya bisa beda-beda tergantung kita setting di variablesnya apa.. bisa py, python, python3, etc). Nah, udah manggil pythonnya baru kita manggil module pip (fungsi dari -m itu berarti kita manggil pip sebagai module, dan bukan scriptnya langsung.. beberapa kasus bisa aja langsung py pip list
cuman kadang bisa nimbulin error juga). Terakhir, baru aja kita jalanin fungsi listnya dan hasilnya tuh dia bakal ngeluarin list library yg terinstall secara global. Nah, klo gambar kedua tuh pip list
, posisinya dia udah masuk ke virtual environmentnya jadi tinggal langsung manggil command pip aja gk usah make py. Dan hasil listnya juga dia bakal ngasilin library yg terinstall hanya di virtual environmentnya aja._ dan -
, tidak disarankan menggunakan spasi juga. Nah, terus si namanya tuh gk boleh sama satu sama lain.requirements.txt
(gk harus itu namanya, cuman standard org-org biasanya makenya gitu). Nah, nanti kita juga bisa langsung install semua package dari file requirements.txt
dgn command pip install -r requirements.txt
tanpa harus install dan ketik satu satu gitu..requirements.txt
nya.requirements.txt
(biasa dipake org-org).. knp harus ngikutin org-org?.. yah.. karena kan kalo kodingan kita mau disimpen di github misal.. trs org lain mau make kodingan kita jg.. nah, kan butuh install-install gitu.. biasanya nama filenya requirements.txt
. Jadi, nnt si orgnya langsung tau dan installnya gampang.. kebayang klo dikasih nama aneh-aneh.Afifah Ulya Nadira (10222090)
Muhammad Azfa Mukhlis (10223036)
Explain the differences in previous slide.
The difference in the previous slide is that the command prompt at the top is outside the virtual environment and theres only one package is installed, while the command prompt at the bottom is inside the virtual environment and there is 2 packages installed.
Why the differences can exist? Explain in brief.
The virtual environment is the cause of these differences. A virtual environment helps isolate project dependencies and make data more secure.
What is the name of virtual environment?
In this scenario, the virtual environment is named "butiran".
Is the name free to choose?
It is free to choose other name
How many virtual environment are allowed in a computer?
There is no strict limit of how much virtual environments are allowed, its only limited by your own available storage.
What is the purpose of pip list
command?
The purpose of
pip list
command is to shows a list of installed packages in the environments along with it's version
What is the purpose of pip freeze
command?
The purpose of
pip freeze
command is to save the installed package inside the virtual enviroment. Also the output ofpip freeze
can be redirected torequirements.txt
.
What is the purpose of > requirements.txt
after pip freeze
?
The purpose of
> requirements.txt
afterpip freeze
is to redirect the output ofpip freeze
torequirements.txt
. Wich can be used to share with others.
Can other name instead of requirements.txt
be used?
Yes you can, but the
requirements.txt
is a standard name often people used
Why is that a process of cloning a virtual environment?
Because process of cloning is allows you to create an exact copy of the virtual environment in another location.
Huzain Hadi (10222045)
The top window shows there are two packages installed in the butiran virtual environment. The bottom window shows only one available packages.
The top window has installed the butiran package while the bottom window has not installed the butiran package.
butiran
Yes
There is no fixed limit, limited only by your system's storage capacity.
Dependency Management: Helps you keep track of which packages and versions are installed, ensuring that your project dependencies are correctly set up. Troubleshooting: Useful for diagnosing issues related to package versions or conflicts. Environment Documentation: Provides a snapshot of the installed packages, which can be shared with others or used to recreate the environment.
Creating Requirements Files: The output of pip freeze can be redirected to a requirements.txt file, which is commonly used to specify the dependencies of a project. This file can then be shared with others or used to recreate the environment. Environment Replication: By using the requirements.txt file generated by pip freeze, you can recreate the exact environment on another machine or virtual environment. Dependency Management: Helps in tracking the exact versions of packages installed, which is crucial for ensuring compatibility and reproducibility of your projects.
To save list of the installed packages
Possible
Because it still needs to install the previous packages
Luthfi Muhammad Din Prakoso(10219005)
The top part says “py -m pip list”. Means that its open the package that contained in the computer main environment. it calls the environment in the python folder in the C drive. The bottom one, says “(butiran) V:>pip list”. It means that it calls all the package contain in the butiran folder or butiran environment.
It’s caused by a section called by environment. when environment is made, then it can be used for its special function based on all the package it contained. Its like a software that provide some function with all the tools it has.
The virtual environment’s name is butiran
Yes, virtual environment’s name is free to choose. Yet the package name is determined by its creator.
There’s no such limit for the number of the virtual environment allowed in a computer. As long as the computer still has space in its storage, virtual environment will be possible to be made.
Pip list is a command to list all the package contained in an environment.
Pip freeze is a command to list all packages that have been installed.
We’re using the requirements.txt to tell the system to make the list in a txt file named requirements.
Yes, I tried it.
Because the command asks the system to install all the packages listed in the requirements.txt to the new virtual environment following with the specific version that has been listed.
1.Explain the differences in previous slide There are some differences between the two images. The first image only has the pip 24.0 version installed, whereas the second image has both the pip 24.0 version and details 0.0.9. The next difference is that in the first photo it is outside the virtual environment, while in the second, the 2 libraries are inside the virtual environment.
2. Why the differences can exist? Explain in brief. the difference can exist because from the propt command it can be seen that the top photo is in the global enviroment, while the bottom photo is already in the virtual enviroment.
3.What is the name of virtual environment? butiran
4.Is the name free to choose? yaps
5.How many virtual environment are allowed in a computer? There is no limit to this, but in the context of computers, what needs to be considered is the storage capacity of the computer.
6.What is the purpose of pip list
command?
pip list
command has a function to display all packages/libraries that have been installed in an environment. besides that it can also display the version of the package/library that has been installed.
7.What is the purpose of pip freeze
command?
pip freeze
has a function that can display a list of all packages and their versions that the device has installed. the advanced function of this command is to install the same package on another device and can be shared with other people and these other people can use the same package that we use.
8.What is the purpose of > requirements.txt
after pip freeze
?
the first command, to display a list of all installed packages. the second command, to save this list to a file called requirements.txt.
or any other name you like.
9.Can other name instead of requirements.txt
be used?
yaps, we can use other names
10.Why is that a process of cloning a virtual environment? because in the picture, all packages in the initial environment are copied to the new virtual environment without removing the previous package.
Name: Kristofer Adrian NIM: 13123062
Chaesya Jasmine - 10223040
1.Explain the differences in previous slide! Perbedaannya adalah gambar pertama menampilkan daftar python package di lingkungan global, sementara gambar kedua menampilkan daftar python package di lingkungan virtual.
2.Why the differences can exist? Explain in brief! Perbedaan ini bisa muncul karena di gambar pertama, pengguna hanya menginstal satu paket (pip versi 24.0), sedangkan di gambar kedua, pengguna menginstal paket tambahan (butiran) dan mengaktifkan virtual environment.
3.What is the name of virtual environment? Dalam skenario ini, virtual environment diberi nama "butiran."
4.Is the name free to choose? Yup, nama virtual environment bebas dipilih. Tapi kalau the package name, itu ditentukan oleh pembuatnya.
5.How many virtual environment are allowed in a computer? Tidak ada batasan jumlah virtual environment yang bisa dibuat di komputer. Selama ruang penyimpanan masih ada, kita bisa terus membuat virtual environment.
6.What is the purpose of pip listcommand? Perintah pip list berfungsi untuk melihat semua packages/libraries yang sudah diinstal di suatu lingkungan, sekaligus versi dari setiap paket tersebut
7.What is the purpose of pip freezecommand? Perintah ini menampilkan packages yang terinstal dalam format lebih spesifik, termasuk versi paketnya. Format ini biasanya digunakan untuk mencatat atau mendokumentasikan the packages yang digunakan dalam proyek Python, supaya bisa di-reuse di kemudian hari.
8.What is the purpose of > requirements.txtafter pip freeze? Perintah pertama, untuk menampilkan daftar packages yang sudah diinstal. Perintah kedua, untuk menyimpan daftar ini ke file bernama requirements.txt, atau bisa pakai nama lain.
9.Can other name instead of requirements.txtbe used? Kita juga bisa pakai nama file selain requirements.txt. Nama filenya bebas.
10.Why is that a process of cloning a virtual environment? Karena di gambar tersebut semua paket di lingkungan awal disalin ke virtual environment yang baru tanpa menghapus paket yang sudah ada sebelumnya.
10223067/ Gwen Sevilen
The command prompt is run outside of a virtual environment (in :C) on the image above. In contrast, the image below shows the command prompt run inside a virtual environment, specifically within the butiran
folder. As a result, the output displays butiran
and the pip version.
The difference exists because it ran in a different virtual environment, one in :C and the other in :V.
The name of the virtual environment is butiran.
Yes
There are no limitations as long as the computer's storage can accommodate it.
The pip list
is used to show the features/ packages we own or have downloaded in an environment.
The pip freeze
is used to save a list of the installed packages. This command also can be used to show all installed packages in an environment and their version.
The > requirement.txt
after pip freeze
is used to provide the name of the package list shown by pip freeze
in an environment, so it can be duplicated to other systems.
Yes. The name requirements.txt
is used to simplify things for others dealing with those packages, otherwise, we can still use a different name.
Because the process downloads packages from requirement.txt
. This means the computer/ system copies all the packages from a virtual environment along with their versions.
Adinda Mutiara Salsabiela - 10223012
Explain the differences in previous slide. Perbedaannya yaitu pada gambar pertama, perintah dijalankan di global environment tanpa menggunakan package tambahan selain pip. Sedangkan, pada gambar kedua dijalankan di virtual environment menggunakan package butiran tambahan.
Why the differences can exist? Explain in brief? Perbedaan ini ada sebab pada global environment semua package terinstal secara sistem-wide dan dipakai untuk semua proyek. Sedangkan, pada virtual environment packages diinstal secara terpisah untuk tiap-tiap proyek demi menjaga isolasi package dan kontrol versi terbaik.
What is the name of virtual environment? Nama virtual environment-nya adalah "butiran".
Is the name free to choose? Ya, kita bebas memilih nama untuk virtual environment sesuai keinginan.
How many virtual environment are allowed in a computer? Tidak ada batasan jumlah tertentu dalam membuat virtual environment. Kita bisa membuat virtual environment sebanyak mungkin selama ruang penyimpanan kita masih bisa menampungnya.
What is the purpose of pip list command? Perintah pip list berfungsi untuk menampilkan daftar package Python yang terinstal di environment tempat perintah tersebut dijalankan, baik itu di global atau virtual environment.
What is the purpose of pip freeze command? Perintah pip freeze bertujuan untuk menghasilkan daftar package Python yang terinstal lengkap dengan versinya dalam format yang cocok untuk file requirements.txt.
What is the purpose of > requirements.txt after pip freeze? Fungsi > requirements.txt adalah untuk menyimpan output dari perintah pip freeze ke dalam file bernama requirements.txt.
Can other name instead of requirements.txt be used? Ya, kita dibebaskan untuk menggunakan nama lain selain requirements.txt.
Why is that a process of cloning a virtual environment? Proses tersebut disebut kloning virtual environment karena kita menggunakan file requirements.txt untuk meniru environment Python yang sudah ada sebelumnya dan memastikan bahwa semua package serta versinya cocok dengan environment asli.
Adiyasa Pratama Putra - 10223101
Jonathan Sugijanto - 10222007
Aldi Wahyu Permana - 10223039
pip 24.0
only, while the photo below shows a command prompt that displays the virtual environment with butiran 0.0.9
and pip 24.0
butiran
.pip list
command is to display the entire list of packages that have been installed.pip freeze
command is to save the entire list of packages that have been installed in the current environment.>requirements.txt
is to redirect to requirements.txt
Nama : 'Izzah Huwaidah NIM : 10222040
1. Explain the differences in previous slide. Perbedaan pada slide sebelumnya, pada gambar di atas itu memiliki perintah pada command prompt untuk mendata/memberikan output berupa list semua package/library yang terinstal di luar virtual environment atau global, dengan penjelasannya yaitu, py yaitu python launcher untuk memanggil python, sedangkan -m berguna untuk memberitahu Python untuk menjalankan modul sebagai sebuah skrip. Dimana pip berupa modul yang mengelola paket seperti library/packages untuk python, lalu list yaitu perintah yang diberikan dari pip untuk memberikan daftar paket/library yang sudah di instal pada lingkungan/environment. Sedangkan pada gambar di bawah, fungsinya juga sama hanya saja ia hanya akan memberikan daftar paket/library yang terinstal di lingkungan yang berbeda yaitu di virtual environment pada kasus pada gambar tersebut
2. Why the differences can exist? Explain in brief. Karena berada pada lingkungan yang berbeda, pada gambar di bawah sebelumnya lingkungan environment butiran sudah di aktivasi sehingga perintah sudah berada pada lingkungan environment, lalu menginstal paket/library pada virtual environment dapat mengisolasi beberapa paket yang terinstal dalam satu proyek tidak memengaruhi/berhubungan dengan paket/library yang terinstal di proyek lainnya di lingkungan global.
3. What is the name of virtual environment? butiran
4. Is the name free to choose? Bebas untuk memilih nama apapun untuk virtual environment, asalkan tidak memuat usur spasi ataupun symbol/karakter khusus seperti * # dan lainnya.
5. How many virtual environment are allowed in a computer? Tidak ada Batasan dalam membuat virtual environment, hanya seberapa cukup ruang penyimpanan computer bisa menampung penyimpanan dari virtual environment yang dibuat
6. What is the purpose of pip list command? Pip list digunakan untuk memerintahkan memberikan daftar list paket/library yang telah di instal pada suatu lingkungan
7. What is the purpose of pip freeze command? Untuk menyimpan list packages yang sudah terinstal ke suatu file yang akan dibuat dan menampilkan paket/ library apa saja yang terinstal dan versi dari paket/library tersebut juga (di dalam file nya)
8. What is the purpose of > requirements.txt after pip freeze? File requirements berguna untuk menyimpan daftar paket/library dan versinya yang dibutuhkan untuk suatu proyek dengan python
9. Can other name instead of requirements.txt be used? Bisa nama apa saja yang digunakan untuk itu, tetapi format file nya tetap harus ada .txt dan tidak dapat diubah
10. Why is that a process of cloning a virtual environment? Karena pada slide 71 tersebut perintah di dalamnya memang untuk menginstal semua yang ada di file requirement tersebut sehingga seperti menyalin semua library yang terdapat di dalam file tersebut sehingga dinamakan juga proses cloning.
Mulyadi Prasojo - 10222053
Nasya Nabila 10222112
Angel Betesda Silaban 10223031 Tugas 02 - Instalasi perangkat lunak dan platform
Khusnil Arifandi Purnama 10222081 Tugas 2
Name: Kayla Sabira Yusuf NIM : 10223094
Fauzan Akbar Ramadhan - 10222114
Perbedaan yang dimaksud mungkin merujuk pada perbedaan antara virtual environment dan penggunaan pip untuk mengelola dependensi Python. Virtual environment adalah cara untuk mengisolasi proyek-proyek Python agar tidak saling berinteraksi, sedangkan pip digunakan untuk menginstal dan mengelola dependensi.
Perbedaan dapat ada karena setiap proyek memiliki kebutuhan yang berbeda-beda dalam hal dependensi dan penggunaan library. Dengan menggunakan virtual environment, setiap proyek dapat memiliki konfigurasi yang unik tanpa mempengaruhi proyek lain.
Butiran
Tidak ada batasan jumlah virtual environment yang dapat dibuat di komputer, tetapi pengguna harus berhati-hati dalam mengelola mereka agar tidak saling berinteraksi secara tidak sengaja.
pip list digunakan untuk menampilkan daftar semua dependensi yang telah terinstal di virtual environment.
pip freeze digunakan untuk menampilkan daftar semua dependensi yang telah terinstal di virtual environment dalam format yang dapat ditulis ke file (requirements.txt).
Setelah menjalankan pip freeze, hasilnya dapat ditulis ke file requirements.txt untuk mencatat semua dependensi yang telah terinstal. Ini berguna untuk memudahkan penginstalan ulang proyek di masa depan.
Ya, nama file dapat diubah sesuai kebutuhan, tetapi requirements.txt adalah nama yang umum digunakan.
Proses cloning virtual environment digunakan untuk membuat salinan dari virtual environment yang sudah ada. Ini berguna untuk membuat proyek baru dengan konfigurasi yang sama tanpa harus menginstal semua dependensi secara manual.
Abraham heven philia saragih 10223038
1.Explain the differences in previous slide the differences lies on the function of the prompt.on the top image it shows python package list in global environment, the second picture shows python package list in virtual environment.
2.Why the differences can exist? The differences may stem from the Python virtual environment, which is isolated from the global environment. The image below shows the virtual environment with its own packages.
3.What is the name of virtual environment Butiran
4.Is the name freely choose? yes,You can name the virtual environment however you like
5.How many virtual environment are allowed in a computer? There is no actually limit how many Virtual environment that exist in your computer as long your device have the necessary specification
6.What is the purpose of pip list command? a command function that show all Python packages in the current environment.
7.What is the purpose of pip freeze command? To show all python packages in the current environment then store it to a file
8.What is the purpose of > requirements.txtafter pip freeze? As a file that can be used to duplicate all Python packages that were previously captured by pip freeze
9.Can other name instead of requirements.txtbe used? As long the file ended with .txt you can rename it the way you like it.But the requirements.txt is commonly use
10.Why is that a process of cloning a virtual environment? duplicating the virtual environment give you the exact package versions the requirements.txt file.With this you could recreate the same environment in different device without installing all python packages
Gerizim El Masih (10222089)
Q: 1. Explain the differences in previous slide. A: Perbedaan antara kedua gambar tersebut yakni pada gambar atas command prompt berada pada global environment yang sudah diinstal paket pip 24.0 version, sedangkan gambar bawah command prompt berada pada virtual environment yaitu ‘butiran’ yang diinstal dua paket yaitu butiran 0.0.9 version dan pip 24.0 version
Q: 2. Why the differences can exist? Explain in brief. A: Perbedaan tersebut dapat muncul karena si pengguna hanya menginstall satu paket yaitu pip 24.0 version pada command prompt gambar atas, sedangkan pada gambar bawah si pengguna telah menginstal paket ‘butiran’ sebagai paket tambahan dan diaktivasi sebagai virtual environment
Q: 3. What is the name of virtual environment? A: Nama virtual environment-nya yaitu ‘butiran’
Q: 4. Is the name free to choose? A: Ya, nama virtual environment bebas untuk dipilih
Q: 5. How many virtual environments are allowed in a computer? A: Tidak ada batas yang pasti namun tergantung kapasitas dan kemampuan komputer
Q: 6. What is the purpose of pip list command? A: Tujuannya untuk membuat daftar atau list dari paket yang telah diinstal untuk tiap versinya
Q: 7. What is the purpose of pip freeze command? A: Tujuannya untuk menyimpan daftar dari semua paket yang telah diinstal Bersama dengan versinya di environment saat itu juga
Q: 8. What is the purpose of > requirements.txt after pip freeze? A: Sebagai file dimana semua semua paket yang telah diinstal beserta dengan versinya dapat digunakan di virtual environment yang sama
Q: 9. Can other name instead of requirements.txt used? A: Ya, dapat digunakan nama lain selain requirement.txt
Q: 10. Why is that a process of cloning a virtual environment? A: Proses cloning virtual environment digunakan untuk membuat salinan virtual dari suatu virtual environment, pada hal ini seluruh paket yang ada dicopy lalu disalin atau paste ke virtual environment yang baru layaknya proses kloning
pip list
command will shows the list of installed packages in the environment.pip freeze
command will save all the installed packages in the environment.> requirements.txt
after pip freeze
shows that all the saved packages in the environment will be formatted into a text and saved into a file named requirements.txt
.requirements.txt
)-r
in the code pip install -r requirements.txt
will command the system to read the requirements.txt
file. The requirements.txt
contains list of all the installed packages in an environment. So, the code pip install -r requirements.txt
will command the system to install the package that listed inside the requirements.txt
file.Q: Explain the differences in previous slide.
A: Pada slide sebelumnya (slide terlampir), perintah yang dijalankan adalah menggunakan Python module flag (py -m pip list
). Hal ini menjalankan pip
dari dalam interpreter Python, sehingga hanya menampilkan paket pip
dengan versi 24.0 yang terinstal secara global. Kemudian, pada gambar kedua (bawah), perintah dijalankan langsung dari virtual environment (butiran
), sehingga selain pip
dengan versi yang sama (24.0), juga terlihat paket lain bernama butiran
dengan versi 0.0.9 yang terinstal di virtual environment tersebut.
Q: Why the differences can exist? Explain in brief.
A: Perbedaan ini ada karena virtual environment memungkinkan pengguna untuk menginstal dan mengelola paket Python secara terpisah dari sistem global. Pada gambar pertama, pip list
menampilkan paket yang diinstal secara global atau di lingkungan Python default, sedangkan pada gambar kedua, pip list
menampilkan paket yang diinstal di dalam virtual environment butiran
, yang dapat memiliki versi atau paket yang berbeda dari sistem global.
Q: What is the name of virtual environment? A: Nama virtual environment yang digunakan pada gambar kedua adalah butiran.
Q: Is the name free to choose? A: Ya, nama virtual environment bebas dipilih oleh pengguna. Pengguna bisa memberikan nama apapun saat membuat virtual environment.
Q: How many virtual environments are allowed in a computer? A: Tidak ada batasan khusus mengenai jumlah virtual environment yang dapat dibuat di komputer. Pengguna dapat membuat sebanyak yang diperlukan sesuai dengan kapasitas penyimpanan komputer yang digunakan.
Q: What is the purpose of pip list
command?
A: Perintah pip list
digunakan untuk menampilkan daftar semua paket Python yang terinstal di lingkungan saat ini (baik itu lingkungan global atau virtual environment), beserta versinya. Hal ini dapat membantu pengguna untuk mengelola, memperbarui, atau memecahkan masalah pada lingkungan Python mereka dengan mengetahui paket apa saja yang telah terinstal dan versi apa yang digunakan.
Q: What is the purpose of pip freeze
command?
A: Perintah pip freeze
digunakan untuk menghasilkan daftar semua paket Python yang terinstal beserta versi pastinya dalam format yang cocok untuk digunakan dalam file requirements. Output ini kemudian dapat disimpan ke dalam file (biasanya bernama requirements.txt
) untuk mendokumentasikan atau membagikan dependensi dari suatu lingkungan.
Q: What is the purpose of > requirements.txt
after pip freeze
?
A: Tujuan dari penggunaan > requirements.txt
setelah perintah pip freeze
adalah untuk menyimpan output dari perintah tersebut ke dalam sebuah file bernama requirements.txt
. File ini akan berisi daftar semua paket Python yang terinstal beserta versi pastinya, dalam format yang dapat digunakan untuk menginstal ulang paket-paket tersebut di lingkungan lain. Dengan kata lain, > requirements.txt
digunakan untuk mengalihkan hasil pip freeze
ke dalam file yang dapat didistribusikan atau digunakan kembali.
Q: Can other name instead of requirements.txt
be used?
A: Ya, kita dapat menggunakan nama lain selain requirements.txt
. Nama requirements.txt
hanyalah sebuah konvensi, namun tidak harus digunakan. Kita dapat memberikan nama file apa saja yang kita inginkan, seperti dependencies.txt
, packages-list.txt
, atau nama lain sesuai keinginan. Perlu diingat bahwa ketika kita ingin menginstal paket dari file tersebut, kita harus menyebutkan nama file yang benar. Contohnya:
pip install -r nama_file_custom.txt
Q: Why is that a process of cloning a virtual environment?
A: Proses ini disebut kloning lingkungan virtual karena tujuan utamanya adalah untuk mereplikasi atau menyalin lingkungan pengembangan Python yang ada, termasuk semua paket dan versinya, ke lingkungan lain. Dengan melakukan kloning, kita dapat memastikan bahwa lingkungan Python di komputer atau proyek lain memiliki dependensi yang sama, sehingga kode dapat berjalan tanpa masalah kompatibilitas. Dengan menggunakan file seperti requirements.txt
, kloning lingkungan virtual membantu menjaga konsistensi dan stabilitas dalam pengembangan proyek Python.
butiran
aside from just being pip.(butiran) V:\>
in the command line, it means that the command prompt is being called in the butiran
virtual environment.tf
and other
respectively, you can freely choose the name of the virtual environment.pip list
command is used to list out all of the installed package that you have installed on your PC or in your virtual environment if you have called it in one.requirements.txt
file is required so that the pip freeze
can save its content of installed packages into a text file to be distributed or saved for further use.requirements.txt
can be used for containing the list of installed packages of a certain virtual environment. You can name it depending on your needs, but the general naming convention for cloning virtual environments is usually using the name requirements.txt
.requirements.txt
contains a list of all installed packages of a certain virtual environment thus installing it in another virtual environment would result in the new one getting all of the packages of the other virtual environment. Hence, this is essentially a process of cloning a virtual environment.Yafi Zainul Muttaqin 10223017
1.Explain the differences in previous slide. Gambar satu dengan command prompt pada Global Environtment, sedangkan gambar lainnya pada Virtual Environtment
2.Why the differences can exist? Explain in brief. Ya, sebab perbedaan environment akan menciptakan perbedaan
3.What is the name of virtual environment? Butiran
4.Is the name free to choose? Yes
5.How many virtual environment are allowed in a computer? Tidak terbatas
6.What is the purpose of pip list command? Menampilkan semua list python yang telah diinstal sesuai dengan environment
7.What is the purpose of pip freeze command? Untuk menyimpan daftar list yang telah diinstal
8.What is the purpose of > requirements.txt after pip freeze? Hasil dari pip freeze dapat ditulis di requirements.txt dan disimpan dengan format text file
9.Can other name instead of requirements.txt be used? Ya, asalkan tetap menggunakan format .txt
10.Why is that a process of cloning a virtual environment? Untuk membuat environment baru tanpa merusak environment yang lama
Assignment 2 - Ahmad Alfian Tri Saputro (10222050)
C:/>py -m pip list
, so that the environment used is the global environment. Meanwhile, the bottom image shows that the command prompt executes (butiran) V:\>pip list
, so the environment used is the virtual environment (butiran).pip list
command is used to display the list of packages installed in the current environment, including the versions of those packages.pip freeze
command is used to generate a list of installed Python packages along with their versions in the format typically used for creating a requirements.txt file.> requirement.txt
after pip freeze is used to direct the output of pip freeze into a file called requirements.txt. This file can then be used to be shared or replicated for further uses..txt
. However, requirement.txt
is generally used in many ocasion.requirements.txt
file. It allows us to use the recreation of an identical environment on a different computer or virtual environment by installing those specific package versions.M. Daryl Putra Akbar Kusdinar 10222116
Assignment 02: Software and Platform Installation
Q1: Explain the differences in previous slide.
A: In the first command prompt window (above), the py -m pip list command is run, which calls the global Python interpreter and displays only globally installed pip packages with version 24.0. This list does not include any other packages as the global environment has no additional packages installed.
In the second command prompt window (below), the pip list command is run in a virtual environment called a butiran. It shows the globally installed pip packages (version 24.0) and the additional packages of the granule (version 0.0.9), which are installed only in that particular virtual environment.
Q2: Why the differences can exist? Explain in brief.
A: The differences exist because virtual environments are isolated environments that can have their own packages independent of the global Python environment. In the first instance, the command shows the packages installed in the global Python environment, while in the second, the command is executed inside a virtual environment where additional packages (such as butiran
) may be installed without affecting the global environment.
Q3: What is the name of virtual environment?
A: The virtual environment name used is butiran.
Q4: Is the name free to choose?
A: Yes, the name of a virtual environment is entirely customizable and can be chosen freely.
Q5: How many virtual environments are allowed in a computer?
A: There is no strict limit to the number of virtual environments you can create on a computer. You can create as many virtual environments as your storage space allows.
Q6: What is the purpose of pip list
command?
A: The pip list
command is used to display a list of all installed Python packages in the current environment, along with their respective versions. It provides a clear overview of the packages available in the environment, making it easier to see what is installed at a glance.
Q7: What is the purpose of pip freeze
command?
A: The pip freeze
command is used to generate a list of all the installed Python packages in the current environment along with their respective versions. This command is particularly useful for creating a requirements file (requirements.txt
), which can then be used to replicate the environment on another machine or by another developer.
Q8: What is the purpose of > requirements.txt
after pip freeze
?
A: The > requirements.txt
part after the pip freeze
command is used to redirect the output of the command to a file named requirements.txt
. Instead of just displaying the installed packages and their versions in the terminal, this command saves that information into a file. This file can later be used to recreate the same environment or share the list of dependencies with others.
Q9: Can other name instead of requirements.txt
be used?
A: Yes, you can use any valid filename instead of requirements.txt
when redirecting the output of pip freeze
. The filename can be customized based on your preference or the specific purpose you have in mind.
Q10: Why is that a process of cloning a virtual environment?
A: This process is called cloning a virtual environment because its main purpose is to replicate an existing Python development environment, including all installed packages and their specific versions, to ensure consistency and stability across different settings. By doing so, developers can avoid compatibility issues and minimize the risk of encountering unexpected behavior caused by different package versions.
Assignment 02
Aufa Dirham Hafizh - 10222083
Assignment 02
Rahma Citra Insani - 10222018
Fathiyah Shidqiya Sadida - 10223073
1. Explain the differences in previous slide. The difference is that in the top image, the command prompt is in a global environment, while in the other image, the command prompt is in a virtual environment.
2. Why the differences can exist? Explain in brief. The virtual environment allows dependency isolation for each project, so each project can use a different version of the package without affecting each other.
3. What is the name of virtual environment? butiran
4. Is the name free to choose? Yes, the naming is free to choose according to each user.
5. How many virtual environment are allowed in a computer? There is no specific limit on the number of virtual environments that can be created on a computer, but it depends on the storage space.
6. What is the purpose of pip list command? The pip list command is used to display all Python packages installed in the active virtual environment.
7. What is the purpose of pip freeze command? The pip freeze command is used to generate a list of installed packages version and is formatted to fit into a file such as requirements.txt
8. What is the purpose of > requirements.txt after pip freeze? To save the output of the pip freeze command into a requirements.txt file, which can be used to replicate the same environment on another computer.
9. Can other name instead of requirements.txt be used? Yes, we can use a different name than requirements.txt, but it's the standard that's often used for Python project dependency documentation.
10. Why is that a process of cloning a virtual environment? The virtual environment cloning process duplicates an existing virtual environment, including all packages and dependencies. This is important when we want to reuse the same environment for another project without having to reinstall all of the packages from scratch.
Nabilah Zulfa Kudrati 10223095
Vincent Constantine Darmawan - 10223072
There are 2 images, the first image depicts a condition without virtual environment, whereas the second image shows a virtual environment called "butiran" being used.
Because the user has set a virtual environment in place beforehand, therefore the use can use a certain set of packages without having it affect other components.
Butiran
Yes, the user doesn't have many restrictions on what to name the virtual environment. The only restriction in naming a virtual environments are : A. No spaces allowed in between letters B. No symbols are allowed
There are no limits to the amount of virtual environments we can make, as long as we still have the space in our storage.
Pip list command allows the user to see all packages installed and used in an active virtual environment.
Pip freeze command allows the user to stop and freeze all ongoing packages being used in a certain virtual environment.
requirements.txt is a command used to save all of the users installed packages into a file named >requirements.txt,, which can be transferred into another virtual environment or even another device if necessary.
Yes, the user can choose any name for the file as long as the file still has .txt at the end of it.
The cloning process of a virtual environments helps the user if the user wants to use the same type of set packages in another virtual environment without having the user install all the packages again manually.
Olvandri Nouva Pratama - 10223033
A: Perbedaan yang terdapat pada dua gambar di slide sebelumnya adalah pada fungsi Command Prompt(cmd). dimana pada gambar pertama, perintah yang digunakan menggunakan model python juga hanya terdapat satu paket yang terinstal yaitu pip
24.0 serta command prompt yang dijalankan berada di lingkungan global. Pada gambar kedua, perintah yang dijalankan menggunakan lingkungan virtual,yang disebut butiran.Perintah ini menunjukkan paket pip yang terinstal secara global (versi 24.0) dan paket tambahan butiran (versi 0.0.9), yang hanya terinstal di lingkungan virtual sesuai yang telah kita buat.
A: Adanya perbedaan dikarenakan lingkungan virtual, Lingkungan virtual membantu mengisolasi ketergantungan proyek dan membuat data lebih aman. pada jendela kedua pengguna menginstal paket tambahan (butiran) dan mengaktifkannya sebagai lingkungan virtual. hal terakhir yang membedakan nya adalah jendela pertama dijalankan dalam program C: dan jendela kedua di program V:.
A: Butiran.
A: Ya, nama bebas dipilih oleh masing masing pengguna tetapi harus sesuai dengan syarat yang telah ditentukan yaitu tanpa menggunakan simbol dan spasi.
A: Tidak terbatas dalam pembuatan lingkungan virtual,asalkan penyimpanan pengguna masih tersedia.
pip list
?A: Perintahpip list
digunakan untuk menampilkan daftar semua paket yang terinstal di lingkungan pengguna saat ini, menunjukkan nama paket dan versinya masing-masing. Perintah ini berguna untuk memeriksa dengan cepat paket apa yang diinstal, memverifikasi versinya untuk memecahkan masalah kompatibilitas, dan memahami dependensi proyek. Selain itu, ia menawarkan opsi seperti --outdated untuk mengidentifikasi paket yang memiliki versi lebih baru, serta menjadikannya alat yang berharga untuk mengelola lingkungan yang dibuat pengguna secara efektif.
pip freeze
?A: Perintah pip freeze
digunakan untuk membuat daftar semua paket yang terinstal di lingkungan saat ini, beserta versi spesifiknya, diformat dengan cara yang sesuai untuk digunakan dalam file persyaratan. Perintah ini sangat berguna untuk membuat file requirements.txt
, yang dapat digunakan untuk membuat ulang lingkungan di instalasi lain atau berbagi dengan orang lain,serta membantu memastikan konsistensi di berbagai lingkungan, sehingga memudahkan pengelolaan ketergantungan dan menjaga stabilitas proyek.
> requirements.txt
setelah pip freeze
?A: untuk menyimpan daftar semua paket yang terinstal beserta versinya dalam format yang mudah dibaca. File ini memungkinkan pengguna atau orang lain untuk dengan mudah menginstal semua dependensi yang diperlukan untuk proyek dengan menjalankan perintah pip install -r requirements.txt
.
requirements.txt
?A: Ya, pengguna dapat menggunakan nama lain sesuai kebutuhan,asalkan terdapat format .txt diakhir penamaan.
A: Karena proses ini terdapat perintah untuk menginstal semua yang ada di file persyaratan tersebut sehingga hal tersebut sama seperti menyalin semua perpustakaan yang terdapat di dalam file tersebut sehingga disebut juga proses kloning lingkungan virtual, dengan memindahkan dari suatu lingkungan ke lingkungan lain.
Santun Wiwaha (10223029)
Raya Nouvalli Pasha (10223008)
Muhammad Rasyid Ghifari (10223064)
Q1:Jelaskan perbedaan dari slide sebelumnya? A1:perbedaannya terletak di packagenya. yang pertama package tersebut diluar environment sedangkan yang kedua di dalam suatu virtual environment
Q2:Mengapa perbedaan itu bisa ada? Jelaskan secara singkat A2:Perbedaan keduanya adalah package yang diinstal di luar virtual environment bersifat global dan dapat diakses oleh semua proyek, namun rentan terhadap konflik versi dan memerlukan izin administrator untuk instalasi. Sebaliknya, package dalam virtual environment terisolasi, sehingga setiap proyek dapat memiliki versi dependensi yang berbeda tanpa risiko konflik, serta tidak memerlukan izin administrator. Ini membuat virtual environment ideal untuk mengelola dependensi proyek secara lebih aman dan fleksibel.
Q3:Apa nama lingkungan virtualnya? A3:nama dari virtual environment nya adalah Butiran
Q4:Apakah nama bebas dipilih untuk virtual environment? A4:ya, nama dari virtual environment bebas untuk dipilih oleh pengguna
Q5:Berapa banyak lingkungan virtual yang diizinkan dalam satu komputer? A5:Tidak terbatas, pengguna bebas membuat sebanyak-banyaknya virtual environment asal penyimpanan komputer pengguna masih tersedia
Q6:Apa tujuan dari perintah pip list A6: Tujuan dari perintah pip list adalah untuk menampilkan daftar semua package Python yang terinstal dalam lingkungan aktif, baik di virtual environment maupun di instalasi global.
Q7:Apa tujuan dari perintah pip freeze A7:Tujuan dari perintahj pip freezeadalah untuk menghasilkan daftar package yang terinstal beserta versinya dalam format yang dapat disimpan ke file. Daftar ini berguna untuk membagikan atau mereplikasi lingkungan yang sama di tempat lain.
Q8: Apa tujuan dari > requirements.txt setelah pip freeze? A8:Tujuan dari > requirements.txt setelah pip freeze adalah untuk menyimpan output daftar package dan versinya ke dalam file bernama requirements.txt. File ini dapat digunakan untuk mendokumentasikan semua dependensi proyek, sehingga mudah dibagikan dan memungkinkan orang lain menginstal package yang sama dengan perintah pip install -r requirements.txt, memastikan lingkungan yang konsisten.
Q9:Apakah nama lain dapat digunakan selain requirements.txt? A9:ya, pengguna bebas untuk menggunakan nama lain
Q10:Mengapa hal ini merupakan proses kloning lingkungan virtual? A10:Proses ini dianggap sebagai kloning lingkungan virtual karena dengan menyimpan daftar package dan versinya dalam file requirements.txt. pengguna bisa mereplikasi (mengkloning) lingkungan virtual yang sama di komputer atau server lain. Saat orang lain menggunakan file tersebut untuk menginstal package dengan pip install -r requirements.txt.
Total time is about 4 hours.