exam questions

Exam DP-100 All Questions

View all questions & answers for the DP-100 exam

Exam DP-100 topic 2 question 65 discussion

Actual exam question from Microsoft's DP-100
Question #: 65
Topic #: 2
[All DP-100 Questions]

You are authoring a notebook in Azure Machine Learning studio.

You must install packages from the notebook into the currently running kernel. The installation must be limited to the currently running kernel only.

You need to install the packages.

Which magic function should you use?

  • A. !pip
  • B. %pip
  • C. !conda
  • D. %load
Show Suggested Answer Hide Answer
Suggested Answer: B 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ajay0011
Highly Voted 1 year, 8 months ago
Selected Answer: B
The %pip magic function is used to install Python packages directly from the notebook environment, and it installs packages only in the currently running kernel. This means that any packages you install with %pip will be available only in the notebook session where you install them. The !pip command is used to install Python packages in a system-wide installation of Python. It does not restrict the installation to the currently running kernel, and packages installed with !pip will be available to all Python processes on the system. The !conda command is used to install packages using the Conda package manager. While Conda is a popular package manager, it does not integrate well with the notebook environment and can cause conflicts with the Anaconda distribution of Python that is used in Azure Machine Learning. The %load magic function is used to load the contents of a file into a cell. It is not used for installing packages. Therefore, the correct answer is option B: %pip.
upvoted 12 times
...
TA_
Most Recent 8 months, 2 weeks ago
Selected Answer: B
On exam 15-03-2024. Plus, there were a few other questions related to kernels
upvoted 1 times
...
NullVoider_0
9 months, 4 weeks ago
On exam 12-02-2024.
upvoted 2 times
...
phydev
1 year, 4 months ago
On exam 20 July 2023.
upvoted 4 times
...
Jin_22
1 year, 8 months ago
Selected Answer: B
The !pip command installs packages from the notebook into the currently running kernel but does not limit the installation to the currently running kernel only. This means that if you have multiple kernels running in your notebook, !pip will install the package in all of them.
upvoted 3 times
...
Retko
1 year, 8 months ago
Why not !pip?? Can it also be used? Thx
upvoted 1 times
ajay0011
1 year, 8 months ago
The %pip magic function is used to install Python packages directly from the notebook environment, and it installs packages only in the currently running kernel. This means that any packages you install with %pip will be available only in the notebook session where you install them. The !pip command is used to install Python packages in a system-wide installation of Python. It does not restrict the installation to the currently running kernel, and packages installed with !pip will be available to all Python processes on the system.
upvoted 1 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...