dudung / fi2151-01-2024-1

Modeling, Data Generator and Analysis course in 2024-1 semester
MIT License
2 stars 0 forks source link

Assignment 02 -- Software and platform installation #3

Open dudung opened 2 months ago

dudung commented 2 months ago

Total time is about 4 hours.

ARoyyanF commented 2 months ago

Ahmad Royyan Fatah - 10222065

  1. the top command prompt isn't inside a virtual environment while the image below it is inside a virtual environment
  2. the difference exist because the 2 images are within a different environment
  3. butiran
  4. yes
  5. as much as you want
  6. list installed packages within context of the current environment
  7. format installed packages within context of the current environment for a requirement file
  8. to dump the output of pip freeze to requirements.txt
  9. yes, however its best to use requirements.txt as it is the conventional name
  10. because the process instructs pip to install all packages based on the information provided in the requirement file, effectively cloning a virtual environment from said requirement file
KindlyGentleman commented 2 months ago

Muhammad Kamal's Assignment 02 - Software and Platform Installation

Muhammad Kamal (10222087)

Questions and Answers

image

Q: Explain the differences in previous slide!

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.

Q: Why the differences can exist? Explain in brief!

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).

Q: What is the name of virtual environment?

A: butiran

Q: Is the name free to choose?

A: Yes, the name is free to choose when creating it, indicated by the command:

python -m venv <name>

Q: How many virtual environment are allowed in a computer?

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.

Q: What is the purpose of 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

Q: What is the purpose of 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

Q: What is the purpose of > 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

Q: Can other name instead of 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.

Q: Why is that a process of cloning a virtual environment?

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.

Haffiz1 commented 2 months ago

Ahmad Haffiz Fildzah (10222001)

  1. The differences of the previous slide is that the top image is showing the command prompt using the C drive with 1 package installed while the bottom image is showing the command prompt using virtual environment named "butiran" from the V drive with 2 package installed
  2. Because the 2 images from the previous slide are using different environments, the bottom image is using virtual environment, thus its shown differently from the top image
  3. Its called "butiran"
  4. Yes, it can be named freely
  5. Limitless, you can make as many as you needed
  6. To show the available installed package in an environment
  7. To save a list of the installed packages from an environment
  8. Its used to install the same version of package used from a different environment that is previously listed
  9. Yes, other name can be used, but requirement.txt is more of a standard/default way to name it so that is can be used/distributed easily
  10. Because the processes given on the slide is giving orders to make a new virtual environment with a different name (named "other") and then it's giving orders to install the packages from the previous virtual environment's (named "tf") listed packages in requirements.txt. Thus, that is the process of cloning a virtual environment (from "tf" virtual environment to "other" virtual environment)
Frosty8171 commented 2 months ago

Ilham Ghufroni (10221012)

  1. The difference is the first picture shows python package list in global environment, the second picture shows python package list in virtual environment.
  2. Python can be split into two environments to manage and isolate its package.
  3. Butiran.
  4. Yes, butiran is just an example.
  5. There’s no limitation as long your computer can support all the virtual environments.
  6. The purpose of pip list is to show all installed python package in an environment with its version and displaying it in a readable way for a human user.
  7. The purpose of pip freeze is to show all installed python package in an environment with its version for saving the exact package list of that python environment.
  8. The purpose of > requirement.txt is to save the exact package list of a python virtual environment. So that it can be duplicated to other systems and recreating the same virtual environment elsewhere.
  9. No, requirement.txt is an established format that lists the packages required for a Python project.
  10. Because the code is installing package library of another virtual environment with requirement.txt. Basically "other" virtual environment is a duplicate of "tf" virtual environment.
Coocoomber333 commented 2 months ago

Afrah's Assignment 02 -- Software and platform installation

10222049_Afrah Damara Yani

Screenshot 2024-09-19 120409

  1. 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.

  2. 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.

  3. What is the name of virtual environment? Answer: butiran, as indicated by (butiran) in the second command prompt.

  4. 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>

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. Can another name instead of requirements.txt be used? Answer: Yes, we can change them, the name is not fixed.

  10. 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.

Alivican commented 2 months ago

Azwa Aliyah Zaki | 10222080

Assignment 02: Software and Platform Installation

1. Python Packages The difference between both picture lies in the installed packages.

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.

mfthn commented 2 months ago

Muhammad Fathin Abdul Aziz | 10222044

  1. The upper part sees the contents of the package in the c partition environment, while the lower part sees the contents of the package in the virtual environment.
  2. Because in the image above no other folders have been added so there is only one in the list.
  3. butiran.
  4. Yes, as long as none of the names are the same as certain folders.
  5. As much storage as the computer can store, if the size of the environment is empty then there is no limit.
  6. To see what the contents of a pip are.
  7. To store installed packages in a virtual environment.
  8. To see what packages or libraries are needed to run a project file.
  9. Yes, we can change the name after creating it to make it easier for other users.
  10. Because reinstalling the requirements.txt file from the tf environment is the same as cloning its contents.
zeedrush commented 2 months ago

Zidan Ramadhan Rusdiana - 10223086

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.

JonathanLijaya commented 2 months ago

10222109 - Jonathan Lijaya

  1. 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.

  2. 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.

  3. Nama dari virtual environment tersebut adalah 'butiran'.

  4. Iya, sangat bebas untuk menentukan nama dari virtual environment.

  5. 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.

  6. Pip list adalah perintah pada command prompt yang digunakan untuk menampilkan seluruh package list yang telah diinstall dalam global environment ataupun virtual environment.

  7. 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.

  8. 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.

  9. 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.

  10. 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.

msyamsuddiin commented 2 months ago

Muhammad Syamsuddiin (10223075)

  1. Command prompt in the top picture shows packages outside of virtual environment. Command in the bottom one shows packages inside of active virtual environment (butiran).
  2. Command "pip list" in the top one is to show packages outside virtual environment which is inactive and in the bottom one, the command in the bottom is only to show packages in the virtual environment.
  3. Butiran
  4. Yes, it's free to choose the virtual environment name
  5. Much as you need, but you have to choose higher computer to handle more virtual environment.
  6. To show the list of installed packages in current environment
  7. To save a list of installed packages and their version to a certain file
  8. As a place to store list of installed packages and their version
  9. Yes, it can but it is recommended to name the file with the name which has same context or use with the word "requirement".
  10. Because the process makes a new virtual environment which has same installed packages as the previous virtual environment without delete or change the previous environment
pheliza commented 2 months ago

Eliza Putri Hapsani (10222103)

  1. In previous slide, the differences are about the package installed and virtual environment. The first image only has one installed package: 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.
  2. Those differences can exist because the user only installed one package (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.
  3. The name of virtual environment is butiran.
  4. Yes, the name of virtual environment is free to choose.
  5. There isn’t a strict limit on the number of virtual environments in a computer, but it depends on and is limited by the storage space of the computer.
  6. The purpose of pip list command is to make a list of the installed packages and each versions.
  7. The purpose of pip freeze command is to save the list of all the installed packages along with their versions in current environment.
  8. The >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.
  9. Yes, we can use the other name instead of requirements.txt. It's free to choose.
  10. That is a process of cloning a virtual environment because we create the exact duplicate of an existing virtual environment and it can be used independently.
catarina-claes commented 2 months ago

TUGAS 2

Muhammad Ya'mal Amilun (10222070)

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:

  1. Kedua gambar di atas memiliki fungsi yang sama yaitu, untuk , untuk menjalankan fungsi list pada script pip. Fungsi list tersebut akan memberikan semua library yang terinstall pada suatu virtual environment ataupun terinstall secara global. Perbedaan dari keduanya adalah, pada gmenjalankan fungsi list pada script pip. Fungsi list tersebut akan memberikan semua library yang terinstall pada suatu virtual environment ataupun terinstall secara global. Perbedaan dari keduanya adalah, pada gambar pertama command 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.
  2. Yah, beda hasilnya kan.. soalnya karena yg pertama tuh package global yg kedua tuh package yg terinstall di virtual environmentnya aja.
  3. butiran.
  4. Yah boleh aja sih bebas.. cuman gk boleh make symbol-symbol gitu. Yg dibolehin tuh cuman angka, huruf, sama symbolnya paling _ dan -, tidak disarankan menggunakan spasi juga. Nah, terus si namanya tuh gk boleh sama satu sama lain.
  5. Bebas gk ada batasan asal memorinya cukup.
  6. Si pip List Command ini fungsinya untuk nampilin semua dependency/ package/ library yg terinstall di suatu virtual environment/ secara global sama juga nampilin versi dari librarynya gitu.
  7. Fungsi pip freeze command tuh hampir sm kyk yg list, nah cuman dia tuh si hasilnya di simpen gitu di suatu file 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..
  8. Si tanda > tuh fungsinya untuk ngarahin output dari suatu perintah ke suatu file gitu.. yg nama filenya tuh si requirements.txt nya.
  9. Bisa aja.. cuman umumnya make 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.
  10. Iya, soalnya kan dependencies/ packages/ librariesnya sama persis gitu..
afifahulya commented 2 months ago

Afifah Ulya Nadira (10222090)

  1. Perbedaan antara kedua gambar adalah bahwa pada gambar pertama sudah ada satu pustaka yang terinstal diluar Virtual Enviroment, sedangkan pada gambar kedua, terdapat dua pustaka yang terinstal yang berlaku di dalam virtual enviroment
  2. Pada gambar atas, bagian global diluar Virtual enviroment dari program yang digunakan, sedangkan pada gambar bawah, sudah menggunakan virtual environment yang lebih khusus, menciptakan lingkungan tersendiri dengan semua pustaka yang terinstal hanya untuk lingkungan tersebut.
  3. Virtual environment pada slide sebelumnya bernama butiran
  4. Ya, bebas untuk memilih nama yang digunakan
  5. Tidak terbatas
  6. pip list digunakan untuk menginformasikan package apa saja yang sudah ter install ke orang lain atau list pustaka apa saja yang telah ada di environment (lingkungan) tersebut
  7. pip freeze digunakan untuk untuk menyimpan packages yang telah ter install di suatu virtual environment , sehingga orang lain bisa menjalankan program yang sama di komputernya.
  8. requirements.txt setelah pip freeze berguna sebagai nama atau tanda dari kumpulan seluruh package yang tersimpan, agar dapat disalin atau di duplikasikan ke virtual environment yang baru dengan nama yang sama
  9. Ya bisa
  10. Proses tersebut merupakan proses cloning dari suatu virtual environment karena pada proses tersebut seluruh package yang ada pada environment awal di copy atau di salin ke virtual environment yang baru seperti proses cloning
AzfaMkh commented 1 month ago

Muhammad Azfa Mukhlis (10223036)

  1. 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.

  2. 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.

  3. What is the name of virtual environment?

    In this scenario, the virtual environment is named "butiran".

  4. Is the name free to choose?

    It is free to choose other name

  5. 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.

  6. 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

  7. 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 of pip freeze can be redirected to requirements.txt.

  8. What is the purpose of > requirements.txt after pip freeze?

    The purpose of > requirements.txt after pip freeze is to redirect the output of pip freeze to requirements.txt. Wich can be used to share with others.

  9. Can other name instead of requirements.txt be used?

    Yes you can, but the requirements.txt is a standard name often people used

  10. 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.

DarellTim commented 1 month ago

DARELL TIMOTHY T (10222014) "Assignment 02 -- Software and platform installation"

  1. The top photo shows the command prompt in the global environment, while the bottom photo shows the command prompt in a virtual environment named butiran with 2 packages installed.
  2. The difference between the two photos is due to the varying environmental conditions. In the bottom photo, there is a virtual environment with the additional package butiran. A virtual environment is an isolated environment that operates independently, without affecting the global environment in Python. It allows us to isolate dependencies for specific projects.
  3. The name of virtual environment is butiran.
  4. The name can be chosen freely.
  5. There is no limit to the number of virtual environments we can create on a computer. We can create as many virtual environments, as long as our computer has enough storage space and resources to support them.
  6. The command is used to display a list of all Python packages installed in the current Python environment along with their versions. It helps users see which packages are installed.
  7. The command lists the installed packages in a more specific format, including the version numbers of each package. This format is often used to record or document the packages used in a Python project, so they can be reused later.
  8. Redirects the output of the pip freeze command into a file named requirements.txt. This file then contains the list of packages and their versions, which is useful for defining the project’s dependencies, so others can install the same packages using this file.
  9. Yes, we can use a different file name instead of requirements.txt. The name is entirely optional.
  10. Cloning a virtual environment refers to creating a duplicate of an existing environment, including all installed packages and their versions. This is typically done to reproduce the same development environment across multiple machines or projects. The steps to do this often involve using the pip freeze command to export a list of installed packages, followed by installing those packages in the new virtual environment, as explained in the earlier example using requirements.txt. The goal is to replicate or mirror the existing environment, creating an identical setup without manually installing each package again.
HuzainHadi commented 1 month ago

Huzain Hadi (10222045)

  1. The top window shows there are two packages installed in the butiran virtual environment. The bottom window shows only one available packages.

  2. The top window has installed the butiran package while the bottom window has not installed the butiran package.

  3. butiran

  4. Yes

  5. There is no fixed limit, limited only by your system's storage capacity.

  6. 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.

  7. 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.

  8. To save list of the installed packages

  9. Possible

  10. Because it still needs to install the previous packages

Luthfimdp commented 1 month ago

Luthfi Muhammad Din Prakoso(10219005)

  1. 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.

  2. 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.

  3. The virtual environment’s name is butiran

  4. Yes, virtual environment’s name is free to choose. Yet the package name is determined by its creator.

  5. 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.

  6. Pip list is a command to list all the package contained in an environment.

  7. Pip freeze is a command to list all packages that have been installed.

  8. We’re using the requirements.txt to tell the system to make the list in a txt file named requirements.

  9. Yes, I tried it.

  10. 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.

aldo02032004 commented 1 month ago

Naufaldo Indra Pratama (10222026)

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 listcommand 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.

KristoferAdrian commented 1 month ago

Name: Kristofer Adrian NIM: 13123062

  1. the difference is that, in the second picture, butiran virtual environment has been activated and the command is run in it where python has been installed.
  2. the difference exist because they are run in different environments
  3. butiran
  4. yes, the name used for the virtual environment can be customized
  5. it's unlimited as long as there are no issues with your computer
  6. to show the list of installed packages as well as their version information
  7. it's a command commonly used to export the list of installed packages by creating a txt file
  8. it is used to put the output of the freeze command into a txt file named requirement.txt
  9. yes the name of the txt file can be customized
  10. the images shown refer to the process of making an exact duplicate of all installed packages in a virtual environment to another environment e.g cloning to a different PC
Chaesyaa commented 1 month ago

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.

agwens commented 1 month ago

10223067/ Gwen Sevilen

  1. 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.

  2. The difference exists because it ran in a different virtual environment, one in :C and the other in :V.

  3. The name of the virtual environment is butiran.

  4. Yes

  5. There are no limitations as long as the computer's storage can accommodate it.

  6. The pip list is used to show the features/ packages we own or have downloaded in an environment.

  7. 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.

  8. 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.

  9. Yes. The name requirements.txt is used to simplify things for others dealing with those packages, otherwise, we can still use a different name.

  10. 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.

Dindabiel commented 1 month ago

Adinda Mutiara Salsabiela - 10223012

  1. 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.

  2. 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.

  3. What is the name of virtual environment? Nama virtual environment-nya adalah "butiran".

  4. Is the name free to choose? Ya, kita bebas memilih nama untuk virtual environment sesuai keinginan.

  5. 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.

  6. 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.

  7. 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.

  8. 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.

  9. Can other name instead of requirements.txt be used? Ya, kita dibebaskan untuk menggunakan nama lain selain requirements.txt.

  10. 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.

adiyasapratama commented 1 month ago

Adiyasa Pratama Putra - 10223101

  1. The difference between those figure is that in the first figure there is no butiran 0.0.9 environment, but in the second figure there is already installed butiran 0.0.9 as a new virtual environment.
  2. The difference comes because of in the second figure there is already installed butiran 0.0.9 as a virtual environment.
  3. The name of the new virtual environment is "butiran 0.0.9".
  4. The name is not to free to choose, there are virtual environments that can be installed if we search for. The other virtual environment is provided by the owner, and the name of the environment is set by the owner.
  5. The is no limit to install virtual environment in a computer. But, it depends on the computer memory capacity.
  6. The pip list command is a command to show all the virtual environments installed in the directory.
  7. The pip freeze command is a command to list all the virtual environment and print it to other file format.
  8. The command >requirements.txt that comes after pip freeze is a command that lead the print of virtual environment into file named requirement.txt.
  9. The name requirements.txt can changed into other name file, but the file format should a file that can show the text.
  10. The pip install -r requirements.txt is cloning virtual environments process because the system will read the file requirements.txt that listed inside the file, then it will install all the virtual environment listed.
JonathanSugijanto commented 1 month ago

Jonathan Sugijanto - 10222007

  1. The first command lists all the installed Python packages on the computer using the py launcher. On the other hand, the second command lists all the installed packages in the “butiran” Python environment. Pip is a native command in Python's virtual environment, so “py -m “ in front is unnecessary.
  2. Pip is a native command in Python's virtual environment, so “py -m “ in front is unnecessary.
  3. butiran
  4. Yes, the name can be freely chosen. However, using whitespaces or symbols is not recommended.
  5. There’s no limit
  6. “pip list” lists all the installed Python packages and their corresponding version.
  7. “pip freeze” saves all the installed Python packages in a file and their corresponding version.
  8. “>” is a redirection operator. This operator redirects the output of pip freeze (saves all the installed Python packages) to a file named “requirements.txt” in the current directory.
  9. Based on the answer to the previous question, “requirements.txt” can be replaced by any other .txt file with any name. Said file doesn’t even need to be a .txt file, other simple file types can also work such as .md and .csv.
  10. Cloning is the process of making an identical copy of the original. The original (tf) only consists of a lot of installed packages, all of which are listed in “requirements.txt”. Therefore, installing the exact packages as stated in “requirements.txt” and their corresponding version would make this virtual environment an exact copy of the original (tf).
aldiwahyuu commented 1 month ago

Assignment 02

Aldi Wahyu Permana - 10223039

  1. In this slide there is a difference, namely the photo above shows a command prompt that displays the global environment (outside the virtual environment) with 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
  2. When used, the bottom photo displays the installed packages specific to the virtual environment. Meanwhile, the photo at the top displays packages installed in the global environment, so they are not yet isolated.
  3. In this example, it is butiran.
  4. Yes, free.
  5. Unlimited. However, we need to pay attention to the specifications of the device (computer).
  6. pip list command is to display the entire list of packages that have been installed.
  7. pip freeze command is to save the entire list of packages that have been installed in the current environment.
  8. >requirements.txt is to redirect to requirements.txt
  9. Yes, can.
  10. Can make it easier to duplicate the new environment elsewhere, also to ensure there are no errors.
IzzahHuwaidah commented 1 month ago

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.

Mul712 commented 1 month ago

Mulyadi Prasojo - 10222053

  1. Perbedaannya adalah pada gambar pertama kode dijalankan tidak dalam virtual environment butiran, sementara gambar setelahnya menunjukan output dari pip list setelah dijalankan pada environment butiran yang telah diiinstal oleh user.
  2. Terdapat perbedaan karena command pip list berfungsi untuk menampilkan package-package yang telah diinstal oleh user, pada gambar 1 dan 2 terdapat perbedaan karena pip list dilakukan setelah menginstal venv butiran.
  3. Nama dari virtual environmentnya adalah butiran
  4. Ya, kita dapat memilih nama untuk virtual environment sesuka hati user
  5. Pada 1 komputer user dapat membuat banyak virtual environment
  6. Untuk melihat package apa saja yang ada pada venv ini
  7. Sebenernya sama seperti pip list, hanya saja format yang dikeluarkan berbeda dan dapat disave dalam bentuk txt dan bisa langsung didownload dengan mudah package-packagenya
  8. Untuk mengesave data output dari pip freeze dalam format file txt
  9. Ya, bisa dibebaskan namanya
  10. Karena terlihat bahwa package-package dalam virtual environmentnya itu sama, cuma dicopy dan dibuat salinannya jadi ada 2 venv yang sama tapi beda
Nasyaabl commented 1 month ago

Nasya Nabila 10222112

  1. The difference from the previous slide is that both have installed (butiran) version 0.0.9 and in the second image are running in a virtual environment.
  2. Because the picture is running in two different environments, in picture 1 running in the local environment, the second picture is running in the virtual environment.
  3. Virtual environment named butiran
  4. Yes, the naming of the virtual environment has no restrictions
  5. There are no restrictions in creating an environment
  6. pip.list to find out what packages are installed in the environment
  7. pip.freeze is useful for storing a list of all packages installed in the environment into a file, for example, requirements.txt
  8. The goal is to direct the results of all lists that have been installed into a file called requirements.txt
  9. Yes, you can use any other name
  10. The process installs the package in a new environment, which has previously been copied
Angelsan-17 commented 1 month ago

Angel Betesda Silaban 10223031 Tugas 02 - Instalasi perangkat lunak dan platform

  1. Gambar pertama menunjukkan perintah py -m pip list di lingkungan global dengan hanya paket pip (versi 24.0).Gambar kedua menunjukkan perintah pip list di virtual environment "butiran" dengan dua paket: butiran (versi 0.0.9) dan pip (versi 24.0).
  2. Gambar pertama di lingkungan global, sedangkan gambar kedua di lingkungan virtual yang terisolasi dengan paket tambahan.
  3. Butiran
  4. Ya, pengguna bisa memilih nama apa saja.
  5. Tidak terbatas, selama ada ruang penyimpanan.
  6. Menampilkan daftar paket Python yang terinstal beserta versinya.
  7. Menghasilkan daftar paket yang terinstal dengan format tertentu.
  8. Menyimpan daftar paket dan versi ke file requirements.txt untuk memudahkan penginstalan ulang paket di lingkungan lain.
  9. Bisa, tapi requirements.txt adalah standar umum.
  10. Untuk membentuk lingkungan virtual baru yang memiliki paket yang sama dengan lingkungan virtual yang lama tanpa mengubah lingkungan yang lama.
Ifan-Apres commented 1 month ago

Khusnil Arifandi Purnama 10222081 Tugas 2

  1. Gambar pertama merupakan command prompt di luar virtual environment, gambar kedua merupakan command prompt didalam virtual environment
  2. adanya perbedaan adalah karena kedua nya berada dalam 2 environment yang berbeda.
  3. butiran
  4. ya, kita bisa memakai nama lain
  5. tidak ada batasan, hanya disk space
  6. berfungsi untuk menampilkan package list yang telah terinstall di virtual environment terkini
  7. berfungsi untuk menampilkan package list yang telah terinstal dengan menyimpannya ke dalam file requirement.txt.
  8. berfungsi untuk menaruh output dari freeze command ke file requirement.txt
  9. ya, bisa bebas.
  10. Proses cloning ke virtual environment ada karena kita bisa menyalin package list yang terinstall ke environment yang baru tanpa menghapus package list sebelum nya.
kaylaashbr commented 1 month ago

Name: Kayla Sabira Yusuf NIM : 10223094

  1. Explain the differences in previous slide. In the first photo, pip is the only installed package, and it run in global environment. Meanwhile in the second photo, there are 2 packages installed, namely pip and butiran, and it run in virtual environment "butiran".
  2. Why the differences can exist? Explain in brief. The differences can exist because it contains different package. The first photo contain pip package and the second photo contains pip package and butiran package.
  3. What is the name of virtual environment? The name of virtual environment is "butiran".
  4. Is the name free to choose? Yes, the name is free to choose.
  5. How many virtual environment are allowed in computer? There is no limit to the number of virtual environments you can create on a computer, as long as you have enough storage and system resources.
  6. What is the purpose of pip list command? The pip list command is used to display a list of all installed Python packages in the current environment.
  7. What is the purpose of pip freeze command? The pip freeze command is used to generate a list of installed Python packages along with their versions, typically for saving to a requirements file.
  8. What is the purpose of > requirements.txt after pip freeze? The purpose of > requirements.txt after pip freeze is to saves the list of installed packages and their versions to a file called requirements.txt.
  9. Can other name instead of requirements.txt be used? Yes.
  10. Why is that a process of cloning a virtual environment? It helps clone a virtual environment by saving exact package versions for easy recreation.
Fauzan114 commented 1 month ago

Fauzan Akbar Ramadhan - 10222114

  1. 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.

  2. 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.

  3. Butiran

    1. Ya, nama virtual environment bebas dipilih oleh pengguna.
  4. 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.

  5. pip list digunakan untuk menampilkan daftar semua dependensi yang telah terinstal di virtual environment.

  6. pip freeze digunakan untuk menampilkan daftar semua dependensi yang telah terinstal di virtual environment dalam format yang dapat ditulis ke file (requirements.txt).

  7. 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.

  8. Ya, nama file dapat diubah sesuai kebutuhan, tetapi requirements.txt adalah nama yang umum digunakan.

  9. 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.

jualancilor commented 1 month ago

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

gerizimel commented 1 month ago

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

ryhanakbr commented 1 month ago

Reyhan Nugraha Akbar - 10223074

  1. The image at the top shows that there is one installed package only. While the image at the bottom shows that there is two installed package in the same device.
  2. This can exist because the bottom image shows the installed packages inside the virtual environment (so the device has virtual environment). The virtual environment isolate the python package inside of it from the other package from global environment (the device's other space).
  3. The virtual environment in the image has the name "butiran".
  4. Yes, you can choose the virtual environment's name freely.
  5. The amount of virtual environment allowed in the device is limitless.
  6. pip list command will shows the list of installed packages in the environment.
  7. pip freeze command will save all the installed packages in the environment.
  8. the > 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.
  9. Yes, we can use other name beside that one (requirements.txt)
  10. The -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.
sekarwidhastri27 commented 1 month ago

Assignment 02: Software and Platform Installation - Sekar Ayu Widhastri - 10222020

S__15990795

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.txtafter 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.

Rafahhh commented 1 month ago

Akhtarriza Harafah (10222011)

  1. The first one is calling the command prompt without being in a virtual environment and the second one is within a virtual environment with an additional package called butiran aside from just being pip.
  2. The differences exist because the first one is not in a virtual environment and the other one is in a virtual environment that is isolated thus can have it's own set of packages.
  3. As proven by the line (butiran) V:\> in the command line, it means that the command prompt is being called in the butiran virtual environment.
  4. As proven by slide 49 and 71 having the virtual environment names of tf and other respectively, you can freely choose the name of the virtual environment.
  5. As many as you want as long as your device have enough storage to support or contain them.
  6. According to slide 64 and many others, the 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.
  7. The command 'pip freeze' is used to contain and save the list of all packages that you have installed into a text file that has all the packages installed. This command is conventionally used so that others can use the text file to clone specific virtual environments.
  8. The 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.
  9. Other names than 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.
  10. As stated in previous answers, the file 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.
yafiizm commented 1 month ago

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

yann-yann commented 1 month ago

Assignment 2 - Ahmad Alfian Tri Saputro (10222050)

  1. Based on slide 44, The differences between the top and bottom images are related to the virtual environment used. The top image indicates that the command prompt is running in a global environment. In contrast, the bottom image shows that the command prompt is running in a virtual environment.
  2. The differences can exist due to Python's virtual environment. The top image shows that the command prompt executes 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).
  3. butiran
  4. Yes, it depends on the user's will
  5. The amount of virtual elements allowed in a computer is unlimited
  6. The pip list command is used to display the list of packages installed in the current environment, including the versions of those packages.
  7. 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.
  8. The > 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.
  9. Yes, as long as the format of the command is .txt. However, requirement.txt is generally used in many ocasion.
  10. This process ensures that the precise package versions and dependencies are recorded in the 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.
darylkusdinar commented 1 month ago

M. Daryl Putra Akbar Kusdinar 10222116

  1. The difference is the above one picture just show only one installed package, while the below one has instaled two packages
  2. It's because we have make the new virtual environment for python and the name is "butiran" after that we install butiran package and list the available packages
  3. The name is butiran
  4. Yes, it is
  5. It depends on your storage availability
  6. Is to make list how many packages do we have
  7. To save list of the installed package
  8. To show the installed packages
  9. Yes
  10. To make an exact package but we can make different packages in cloned virtual environment
dietrichtarigan commented 1 month ago

Dietrich Pepalem Tarigan (10223037)

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.

aufahafizh commented 1 month ago

Assignment 02

Aufa Dirham Hafizh - 10222083

  1. The Difference between the two images is the first image shows installed package on a global environment while the second image shows installed package in a virtual environment
  2. Because the new virtual environment were activated thus it shows the installed package on that activated virtual environment
  3. Butiran
  4. Yes, it's just an example. We can name our own virtual environment
  5. There is no limitation on how much virtual environments can you make as long as you have the storage
  6. pip list command is used to display the installed package on your activated virtual environment
  7. pip freeze allows you to save the installed package in your virtual environment
  8. the > requirements.txt after pip freeze is used to save the output of pip freeze on a txt file to make a list of package requirements for further use
  9. Yes, it's just an example. As long as we use >[any name].txt
  10. To replicate existing virtual environment with all the installed package on a new one
rahmaci commented 1 month ago

Assignment 02

Rahma Citra Insani - 10222018

  1. The differences between is the first one use the global environment and the second one use the virtual environment, both called the package pip 24.0 version, but the second one shown another package called "butiran".
  2. The differences exist because the first one is a global environment and the other one is a virtual environment that is isolated, so it can have it's own set of packages.
  3. Butiran
  4. Yes, the name of the virtual environment is free to choose.
  5. There is no limit to how many virtual environments can be created on a computer. We can create multiple virtual environments for different projects to isolate dependencies.
  6. The pip list command is used to display a list of installed Python packages in the current virtual environment.
  7. The pip freeze command is used to generate a list of all installed Python packages along with their versions in a format that can be used to replicate the environment, such as creating a requirements file
  8. "> requirements.txt" after pip freeze redirects the output of pip freeze to a file named requirements.txt, which can later be used to install the same package versions on another machine using pip install -r requirements.txt.
  9. Yes, you can use any other file name instead of requirements.txt, but the name should be in .txt
  10. Cloning a virtual environment replicates the environment's configuration, including the installed packages and their versions. This ensures that another user or system can recreate the exact same environment.
fssadida commented 1 month ago

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.

nabilahzulfa15 commented 1 month ago

Nabilah Zulfa Kudrati 10223095

  1. Perbedaannya terdapat di gambar paling atas yaitu kode yang di jalankan pada gambar 1 tidak menggunakan virtual environment, gambar 2 menggunakan virtual environment "butiran" yang menyebabkan output yang di dapatkan masing-masing berbeda.
  2. Karena pada gambar 2 di pip list telah di aktivasi virtual environment "butiran" sehingga dapat memerintah untuk menampilkan package yang telah di install.
  3. Butiran.
  4. Ya, kita dapat bebas untuk memilih nama venv dengan nama apapun, namun tidak boleh memakai simbol ataupun spasi.
  5. Pada komputer kita dapat bebas membuat banyak virtual environment namun sesuai dengan ruang penyimpanan di komputer.
  6. Fungsi pip list command adalah untuk menampilkan daftar package yang terdapat pada virtual environment.
  7. Fungsi pip freeze command adalah untuk menampilkan library yang sudah di install serta versi dari library nya dan menyimpan list paket yang telah di install.
  8. Fungsinya untuk menyimpan seluruh paket dan versinya yang sudah terinstall dengan file requirements.txt
  9. Bisa dengan nama apa saja namun nama format nya harus ada .txt
  10. Untuk membuat salinan package yang sudah di install pada environment lama ke environment baru tetapi tidak mengubah package environment yang lama.
VincentConstantine commented 1 month ago

Vincent Constantine Darmawan - 10223072

  1. Explain the differences in the previous slide!

    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.

  2. Why the differences can exist? Explain in brief.

    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.

  3. What is the name of virtual environment?

    Butiran

  4. Is the name free to choose?

    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

  5. How many virtual environment are allowed in a computer?

    There are no limits to the amount of virtual environments we can make, as long as we still have the space in our storage.

  6. What is the purpose of pip list command?

    Pip list command allows the user to see all packages installed and used in an active virtual environment.

  7. What is the purpose of pip freeze command?

    Pip freeze command allows the user to stop and freeze all ongoing packages being used in a certain virtual environment.

  8. What is the purpose of > requirements.txt after pip freeze?

    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.

  9. Can other name instead of requirements.txt be used?

    Yes, the user can choose any name for the file as long as the file still has .txt at the end of it.

  10. Why is that a process of cloning a virtual environment?

    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.

OlvandriNouva commented 1 month ago

Olvandri Nouva Pratama - 10223033

Q1 : Jelaskan perbedaan dari slide sebelumnya?

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.

Q2: Mengapa perbedaan itu bisa ada? Jelaskan secara singkat.

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:.

Q3: Apa nama lingkungan virtual?

A: Butiran.

Q4: Apakah nama bebas dipilih?

A: Ya, nama bebas dipilih oleh masing masing pengguna tetapi harus sesuai dengan syarat yang telah ditentukan yaitu tanpa menggunakan simbol dan spasi.

Q5: Berapa banyak lingkungan virtual yang diizinkan dalam satu komputer?

A: Tidak terbatas dalam pembuatan lingkungan virtual,asalkan penyimpanan pengguna masih tersedia.

Q6: Apa tujuan dari perintah 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.

Q7: Apa tujuan dari perintah 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.

Q8: Apa tujuan dari > requirements.txtsetelah 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.

Q9: Apakah nama lain dapat digunakan selain requirements.txt?

A: Ya, pengguna dapat menggunakan nama lain sesuai kebutuhan,asalkan terdapat format .txt diakhir penamaan.

Q10: Mengapa hal ini merupakan proses kloning lingkungan virtual?

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.

santunw commented 1 month ago

Santun Wiwaha (10223029)

  1. In the image above the installed package is pip 24.0 and in the image below the installed package is butiran 0.0.9 and pip 24.0
  2. The difference can exist because the image above shows the command prompt showing a list of packages installed in the global environment, while the image below shows the command prompt showing a list of packages installed in the virtual environment.
  3. Butiran
  4. Yes, the name is free to choose
  5. There is no limit to how many virtual environments to create
  6. Commands in python to display installed packages
  7. Commands in python to save packages that have been installed in the virtual environment
  8. The purpose is to store the installed packages and their versions into one file and in this example the file is requirement.txt
  9. Yes, the name can be anything
  10. Because the new virtual environment or in this case called other is installed packages from the requirement.txt file where it is all the packages installed in the existing virtual environment so that the new virtual environment has packages with the same version as the old virtual environment
Pasha10223008 commented 1 month ago

Raya Nouvalli Pasha (10223008)

  1. Perbedaan nya adalah pada gambar yang pertama hanya terdapat 1 package diluar environment dan gambar kedua terdapat 2 package didalam environment
  2. Pada gambar pertama, bagian global diluar Virtual enviroment dari program yang digunakan, dan pada gambar kedua, sudah menggunakan virtual environment yang khusus
  3. butiran
  4. Ya
  5. bebas tidak terbatas
  6. pip list digunakan untuk melihat informasi atau melihat list apa saja package yang sudah terinstal
  7. pip freeze digunakan untuk untuk menyimpan semua packages yang telah diinstal
  8. requirements.txt setelah pip freeze berguna sebagai tempat disimpan semua package yang telah diinstal
  9. Ya, bisa
  10. seluruh package yang ada pada environment awal di copy atau di salin ke virtual environment yang baru seperti proses cloning jadi bisa disebut sebagai proses cloning virtual environment
RG102 commented 1 month ago

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.