Chapter 2: Setting Up the Environment
2.1 Setting Up an Integrated Development Environment (IDE)
While it's possible to write Python code in any text editor, using an Integrated Development Environment (IDE) can make your life a lot easier. IDEs provide features like code suggestions, debugging tools, and integrations with version control systems that can significantly speed up your development process.
There are several great IDEs available for Python development. In this book, we'll use Visual Studio Code (VS Code), which is a lightweight but powerful source code editor developed by Microsoft. It's available for Windows, macOS, and Linux, and features built-in support for Python, including features like linting, IntelliSense (code completions), debugging, and more.
You can download VS Code from the official website: https://code.visualstudio.com/
After installing VS Code, you'll also need to install the Python extension. You can do this by opening VS Code and going to the Extensions view (View > Extensions), then searching for the Python extension and clicking Install.
With Python, the necessary libraries, and an IDE installed, you're ready to start writing Python code for NLP tasks.
Download Visual Studio Code Step by Step:
As mentioned before, you can download Visual Studio code from the URL "https://code.visualstudio.com/download" by selecting the right platform:

You can click any of the icons mentioned above, depending on the operating system for which you are planning to download the visual studio code editor.
How to install Visual Studio Code on macOS?
Follow the below steps*(shown in gif file and mentioned in bullet points)* to install the VS Code on macOS:
- Download Visual Studio Code for macOS.
- After clicking on the Mac option on the download site, it will download a zip file, as shown below:
- Double-click on the downloaded zip to expand the contents. It will give a file, as shown below:
- Drag "Visual Studio Code.app" to the "Applications" folder, so as it available in the "Launchpad."
- Double-click on the "Visual Studio Code" to open.
- Add VS Code to your Dock by right-clicking on the icon to bring up the context menu and choosing Options => Keep in Dock.

How to Install Visual Studio Code on Windows?
Firstly, download the Visual Studio Code installer for Windows. Once it is downloaded, run the installer (VSCodeUserSetup-{version}.exe). It will only take a minute.
Secondly, accept the agreement and click on next.

Thirdly, click on "create a desktop icon" so that it can be accessed from the desktop, and click on Next.

After that, click on the install button.

Finally, after installation completes, click on the finish button, and the visual studio code will get open.

By default, VS Code installs under C:\users{username}\AppData\Local\Programs\Microsoft VS Code.

After the successful installation, let's move to the next section to understand the various components of the User Interface of Visual Studio Code Editor.
What are the essential components of the VS Code?
Visual Studio Code is a code editor at its core. Like many other code editors, VS Code adopts a standard user interface and layout of an explorer on the left, showing all of the files and folders you have access to. Additionally, it has an editor on the right, showing the content of the files you have opened. Below are a few of the most critical components of the VSCode editor:

VS Code comes with a straight-forward and intuitive layout that maximizes the space provided for the editor while leaving ample room to browse. Additionally, it allows access to the full context of your folder or project. The UI is divided into five areas, as highlighted in the above image.
- Editor - It is the main area to edit your files. You can open as many editors as possible side by side vertically and horizontally.
- SideBar - Contains different views like the Explorer to assist you while working on your project.
- Status Bar - It contains information about the opened project and the files you edit.
- Activity Bar - It is located on the far left-hand side. It lets you switch between views and gives you additional context-specific indicators, like the number of outgoing changes when Git is enabled.
- Panels - It displays different panels below the editor region for output or debug information, errors, and warnings, or an integrated terminal. Additionally, the panel can also move to the right for more vertical space.
VS Code opens up in the same state it was last in, every time you start it. It also preserves folders, layouts, and opened files.
2.1 Setting Up an Integrated Development Environment (IDE)
While it's possible to write Python code in any text editor, using an Integrated Development Environment (IDE) can make your life a lot easier. IDEs provide features like code suggestions, debugging tools, and integrations with version control systems that can significantly speed up your development process.
There are several great IDEs available for Python development. In this book, we'll use Visual Studio Code (VS Code), which is a lightweight but powerful source code editor developed by Microsoft. It's available for Windows, macOS, and Linux, and features built-in support for Python, including features like linting, IntelliSense (code completions), debugging, and more.
You can download VS Code from the official website: https://code.visualstudio.com/
After installing VS Code, you'll also need to install the Python extension. You can do this by opening VS Code and going to the Extensions view (View > Extensions), then searching for the Python extension and clicking Install.
With Python, the necessary libraries, and an IDE installed, you're ready to start writing Python code for NLP tasks.
Download Visual Studio Code Step by Step:
As mentioned before, you can download Visual Studio code from the URL "https://code.visualstudio.com/download" by selecting the right platform:

You can click any of the icons mentioned above, depending on the operating system for which you are planning to download the visual studio code editor.
How to install Visual Studio Code on macOS?
Follow the below steps*(shown in gif file and mentioned in bullet points)* to install the VS Code on macOS:
- Download Visual Studio Code for macOS.
- After clicking on the Mac option on the download site, it will download a zip file, as shown below:
- Double-click on the downloaded zip to expand the contents. It will give a file, as shown below:
- Drag "Visual Studio Code.app" to the "Applications" folder, so as it available in the "Launchpad."
- Double-click on the "Visual Studio Code" to open.
- Add VS Code to your Dock by right-clicking on the icon to bring up the context menu and choosing Options => Keep in Dock.

How to Install Visual Studio Code on Windows?
Firstly, download the Visual Studio Code installer for Windows. Once it is downloaded, run the installer (VSCodeUserSetup-{version}.exe). It will only take a minute.
Secondly, accept the agreement and click on next.

Thirdly, click on "create a desktop icon" so that it can be accessed from the desktop, and click on Next.

After that, click on the install button.

Finally, after installation completes, click on the finish button, and the visual studio code will get open.

By default, VS Code installs under C:\users{username}\AppData\Local\Programs\Microsoft VS Code.

After the successful installation, let's move to the next section to understand the various components of the User Interface of Visual Studio Code Editor.
What are the essential components of the VS Code?
Visual Studio Code is a code editor at its core. Like many other code editors, VS Code adopts a standard user interface and layout of an explorer on the left, showing all of the files and folders you have access to. Additionally, it has an editor on the right, showing the content of the files you have opened. Below are a few of the most critical components of the VSCode editor:

VS Code comes with a straight-forward and intuitive layout that maximizes the space provided for the editor while leaving ample room to browse. Additionally, it allows access to the full context of your folder or project. The UI is divided into five areas, as highlighted in the above image.
- Editor - It is the main area to edit your files. You can open as many editors as possible side by side vertically and horizontally.
- SideBar - Contains different views like the Explorer to assist you while working on your project.
- Status Bar - It contains information about the opened project and the files you edit.
- Activity Bar - It is located on the far left-hand side. It lets you switch between views and gives you additional context-specific indicators, like the number of outgoing changes when Git is enabled.
- Panels - It displays different panels below the editor region for output or debug information, errors, and warnings, or an integrated terminal. Additionally, the panel can also move to the right for more vertical space.
VS Code opens up in the same state it was last in, every time you start it. It also preserves folders, layouts, and opened files.
2.1 Setting Up an Integrated Development Environment (IDE)
While it's possible to write Python code in any text editor, using an Integrated Development Environment (IDE) can make your life a lot easier. IDEs provide features like code suggestions, debugging tools, and integrations with version control systems that can significantly speed up your development process.
There are several great IDEs available for Python development. In this book, we'll use Visual Studio Code (VS Code), which is a lightweight but powerful source code editor developed by Microsoft. It's available for Windows, macOS, and Linux, and features built-in support for Python, including features like linting, IntelliSense (code completions), debugging, and more.
You can download VS Code from the official website: https://code.visualstudio.com/
After installing VS Code, you'll also need to install the Python extension. You can do this by opening VS Code and going to the Extensions view (View > Extensions), then searching for the Python extension and clicking Install.
With Python, the necessary libraries, and an IDE installed, you're ready to start writing Python code for NLP tasks.
Download Visual Studio Code Step by Step:
As mentioned before, you can download Visual Studio code from the URL "https://code.visualstudio.com/download" by selecting the right platform:

You can click any of the icons mentioned above, depending on the operating system for which you are planning to download the visual studio code editor.
How to install Visual Studio Code on macOS?
Follow the below steps*(shown in gif file and mentioned in bullet points)* to install the VS Code on macOS:
- Download Visual Studio Code for macOS.
- After clicking on the Mac option on the download site, it will download a zip file, as shown below:
- Double-click on the downloaded zip to expand the contents. It will give a file, as shown below:
- Drag "Visual Studio Code.app" to the "Applications" folder, so as it available in the "Launchpad."
- Double-click on the "Visual Studio Code" to open.
- Add VS Code to your Dock by right-clicking on the icon to bring up the context menu and choosing Options => Keep in Dock.

How to Install Visual Studio Code on Windows?
Firstly, download the Visual Studio Code installer for Windows. Once it is downloaded, run the installer (VSCodeUserSetup-{version}.exe). It will only take a minute.
Secondly, accept the agreement and click on next.

Thirdly, click on "create a desktop icon" so that it can be accessed from the desktop, and click on Next.

After that, click on the install button.

Finally, after installation completes, click on the finish button, and the visual studio code will get open.

By default, VS Code installs under C:\users{username}\AppData\Local\Programs\Microsoft VS Code.

After the successful installation, let's move to the next section to understand the various components of the User Interface of Visual Studio Code Editor.
What are the essential components of the VS Code?
Visual Studio Code is a code editor at its core. Like many other code editors, VS Code adopts a standard user interface and layout of an explorer on the left, showing all of the files and folders you have access to. Additionally, it has an editor on the right, showing the content of the files you have opened. Below are a few of the most critical components of the VSCode editor:

VS Code comes with a straight-forward and intuitive layout that maximizes the space provided for the editor while leaving ample room to browse. Additionally, it allows access to the full context of your folder or project. The UI is divided into five areas, as highlighted in the above image.
- Editor - It is the main area to edit your files. You can open as many editors as possible side by side vertically and horizontally.
- SideBar - Contains different views like the Explorer to assist you while working on your project.
- Status Bar - It contains information about the opened project and the files you edit.
- Activity Bar - It is located on the far left-hand side. It lets you switch between views and gives you additional context-specific indicators, like the number of outgoing changes when Git is enabled.
- Panels - It displays different panels below the editor region for output or debug information, errors, and warnings, or an integrated terminal. Additionally, the panel can also move to the right for more vertical space.
VS Code opens up in the same state it was last in, every time you start it. It also preserves folders, layouts, and opened files.
2.1 Setting Up an Integrated Development Environment (IDE)
While it's possible to write Python code in any text editor, using an Integrated Development Environment (IDE) can make your life a lot easier. IDEs provide features like code suggestions, debugging tools, and integrations with version control systems that can significantly speed up your development process.
There are several great IDEs available for Python development. In this book, we'll use Visual Studio Code (VS Code), which is a lightweight but powerful source code editor developed by Microsoft. It's available for Windows, macOS, and Linux, and features built-in support for Python, including features like linting, IntelliSense (code completions), debugging, and more.
You can download VS Code from the official website: https://code.visualstudio.com/
After installing VS Code, you'll also need to install the Python extension. You can do this by opening VS Code and going to the Extensions view (View > Extensions), then searching for the Python extension and clicking Install.
With Python, the necessary libraries, and an IDE installed, you're ready to start writing Python code for NLP tasks.
Download Visual Studio Code Step by Step:
As mentioned before, you can download Visual Studio code from the URL "https://code.visualstudio.com/download" by selecting the right platform:

You can click any of the icons mentioned above, depending on the operating system for which you are planning to download the visual studio code editor.
How to install Visual Studio Code on macOS?
Follow the below steps*(shown in gif file and mentioned in bullet points)* to install the VS Code on macOS:
- Download Visual Studio Code for macOS.
- After clicking on the Mac option on the download site, it will download a zip file, as shown below:
- Double-click on the downloaded zip to expand the contents. It will give a file, as shown below:
- Drag "Visual Studio Code.app" to the "Applications" folder, so as it available in the "Launchpad."
- Double-click on the "Visual Studio Code" to open.
- Add VS Code to your Dock by right-clicking on the icon to bring up the context menu and choosing Options => Keep in Dock.

How to Install Visual Studio Code on Windows?
Firstly, download the Visual Studio Code installer for Windows. Once it is downloaded, run the installer (VSCodeUserSetup-{version}.exe). It will only take a minute.
Secondly, accept the agreement and click on next.

Thirdly, click on "create a desktop icon" so that it can be accessed from the desktop, and click on Next.

After that, click on the install button.

Finally, after installation completes, click on the finish button, and the visual studio code will get open.

By default, VS Code installs under C:\users{username}\AppData\Local\Programs\Microsoft VS Code.

After the successful installation, let's move to the next section to understand the various components of the User Interface of Visual Studio Code Editor.
What are the essential components of the VS Code?
Visual Studio Code is a code editor at its core. Like many other code editors, VS Code adopts a standard user interface and layout of an explorer on the left, showing all of the files and folders you have access to. Additionally, it has an editor on the right, showing the content of the files you have opened. Below are a few of the most critical components of the VSCode editor:

VS Code comes with a straight-forward and intuitive layout that maximizes the space provided for the editor while leaving ample room to browse. Additionally, it allows access to the full context of your folder or project. The UI is divided into five areas, as highlighted in the above image.
- Editor - It is the main area to edit your files. You can open as many editors as possible side by side vertically and horizontally.
- SideBar - Contains different views like the Explorer to assist you while working on your project.
- Status Bar - It contains information about the opened project and the files you edit.
- Activity Bar - It is located on the far left-hand side. It lets you switch between views and gives you additional context-specific indicators, like the number of outgoing changes when Git is enabled.
- Panels - It displays different panels below the editor region for output or debug information, errors, and warnings, or an integrated terminal. Additionally, the panel can also move to the right for more vertical space.
VS Code opens up in the same state it was last in, every time you start it. It also preserves folders, layouts, and opened files.