0% found this document useful (0 votes)
13 views

Lab1 - Setting Up The Environment

Uploaded by

fersd2018
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Lab1 - Setting Up The Environment

Uploaded by

fersd2018
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

HCIP-Datacom-Network Automation Developer Lab Guide

1 Setting up the Environment

1.1 Introduction to Anaconda


Anaconda is a distribution of Python for scientific computing, and it supports Linux, macOS,
and Windows. It provides simplified package management and environment management,
and easily deals with the installation issues when the system has multiple Python versions
and third-party packages. Anaconda uses Conda or Pip to implement package and
environment management. It also comes with Python and related tools. Anaconda is a
Python tool for enterprise-level big data analytics. It contains more than 720 open-source
data-science packages, including data visualization, machine learning, and deep learning. It
can be used for data analysis, big data and AI fields.
Anaconda provides the following features for developers:
● Notebook is supported, which is friendly to beginners.
● Python has been integrated into Anaconda, and there is an option to select the Python
version during download.
● You only need to add a virtual environment to Anaconda when different frameworks
are required to support development. You can conduct development in different
environments without worrying about compatibility issues. You can also configure
environments for special projects to facilitate management.

You can also use other development environments (such as PyCharm) to run Python scripts. PyCharm
is a Python IDE that provides a set of tools to help users improve efficiency in development using
Python, such as debugging, syntax highlighting, project management, code jumping, intelligent tips,
automatic completion, unit test, and version control. In addition, the IDE provides some advanced
functions to support professional Web development under the Django framework.

1.2 Installation Procedure


Step 1 Download Anaconda.
Log in to the official website of Anaconda (https://www.anaconda.com/products/individual),
and click Download to download the installation package.

2023-10-02 Huawei confidential. Page 7 of 40


HCIP-Datacom-Network Automation Developer Lab Guide

Select the version for Windows, macOS, or Linux. In this example, select Windows, select
Python 3.7 (recommended) or Python 2.7, and click 64-Bit Graphical Installer (not
supported by a 32-bit computer).

Step 2 Install Anaconda.


Double-click the Anaconda3-x.x.x-Windows-x86_64.exe file. In the dialog box that is
displayed, click Next.

2023-10-02 Huawei confidential. Page 8 of 40


HCIP-Datacom-Network Automation Developer Lab Guide

Click I Agree.

2023-10-02 Huawei confidential. Page 9 of 40


HCIP-Datacom-Network Automation Developer Lab Guide

Install for: Select Just Me and click Next.

Step 3 Specify the software installation path and click Next.

2023-10-02 Huawei confidential. Page 10 of 40


HCIP-Datacom-Network Automation Developer Lab Guide

Step 4 Configure environment variables.


Select Add Anaconda to my PATH environment variable and Register Anaconda as my
default Python 3.7 to reduce subsequent configurations, and click Install. (Note: If Python
of another version has been installed on the computer, you are advised to remove it and
install Anaconda. If it is not deleted, you are advised to de-select the two options;
otherwise, a path error may occur.)

When the installation is complete, click Next.

2023-10-02 Huawei confidential. Page 11 of 40


HCIP-Datacom-Network Automation Developer Lab Guide

Step 5 View installation information.


Click Next to view related information.

2023-10-02 Huawei confidential. Page 12 of 40


HCIP-Datacom-Network Automation Developer Lab Guide

Click Finish to view the Anaconda tutorial page.

----End

1.3 Verifying the Installation


Run the Python script.
1. Choose Start > Jupyter Notebook to display the Jupyter homepage.

2. Click New in the upper right corner of the page and select Python 3 to create a Jupyter
file.

2023-10-02 Huawei confidential. Page 13 of 40


HCIP-Datacom-Network Automation Developer Lab Guide

The title in the red box is the default title, which can be changed if you double-click the
title.
Enter the code in the green rectangle, and click Run to run the code.

3. Enter the following code in the text box:


print('Hello World') # Print: Hello World
print("Hello World") # Print: Hello World.
#The output is the same regardless of whether single or double quotation marks are carried in input.

4. Click Run, as shown in the following figure.

2023-10-02 Huawei confidential. Page 14 of 40

You might also like