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

Conda Install Numpy: Package Installation

To install packages in Anaconda, enter commands like "conda install numpy" in the Anaconda Prompt. This will download and install the package. Multiple packages can be installed together by listing them separated by spaces. Once installed, packages need to be imported in code using statements like "import numpy as np" to then use their functionality. There are different ways to import from a package depending on how much or little of the package is needed.

Uploaded by

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

Conda Install Numpy: Package Installation

To install packages in Anaconda, enter commands like "conda install numpy" in the Anaconda Prompt. This will download and install the package. Multiple packages can be installed together by listing them separated by spaces. Once installed, packages need to be imported in code using statements like "import numpy as np" to then use their functionality. There are different ways to import from a package depending on how much or little of the package is needed.

Uploaded by

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

Package Installation

Using these packages is easy. All we need to do is install the package and import it
wherever required.
Any package can be installed by directly writing the following command in the Anaconda
Prompt:
conda install numpy
The name of package can be replaced at the end of the statement.

Multiple packages can also be installed in just one command:

This would install NumPy, Pandas and Matplotlib altogether.

Once you begin the installation, after a bit of processing, the prompt would ask if you wish to
proceed for the installation or not:

Press Y to continue with the installation. Within a few minutes, the packages will be installed
and would be ready to use.

Working with a package


To use a package, we need to import it in the script wherever it is required. There are
various versions of importing a package in Python:

Meaning: Import numpy in the file to use its functionalities in the file to which it has been
imported.

Meaning: Import numpy and refer to it as np wherever it is used.

Meaning: import only one functionality (array) from the whole numpy package. While this
gives faster processing, it limits the package’s usability.

Meaning: Import only one functionality (array) from the whole numpy package and refer to it
as arr wherever it is used.

A lot of other combinations can also be explored while importing packages like importing
multiple functionalities of a package in a single statement, etc.

91

You might also like