kopia lustrzana https://github.com/animator/learn-python
Installing numpy (#463)
* Updated List of sections * Updated index.md Added info about how to install NumPy in a system. * Added installing numpy.md file and updated the index.md * Added installing-numpy.md file and updated the index.md * Create installing-numpy.md for installation * Update index.md Added operations-on-arrays.md * Create operations-on-arrays.md * Update index.md * Update index.md * Rename installing-numpy.md to installing_numpy.md * Rename operations-on-arrays.md to operations_on_arrays.md * Update installing_numpy.md * Update index.md * Rename installing_numpy.md to installing-numpy.md * Rename operations_on_arrays.md to operations-on-arrays.md * Update operations-on-arrays.md * Update operations-on-arrays.md * Revert "Update operations-on-arrays.md" * Delete contrib/numpy/operations-on-arrays.md * Update index.md --------- Co-authored-by: Ankit Mahato <ankmahato@gmail.com>pull/499/head^2
rodzic
41a6cefe4c
commit
eefc5d342a
|
@ -1,3 +1,4 @@
|
|||
# List of sections
|
||||
|
||||
- [Installing NumPy](installing-numpy.md)
|
||||
- [Introduction](introduction.md)
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
# Installing NumPy
|
||||
|
||||
NumPy is the fundamental package for scientific computing in Python.
|
||||
NumPy is used for working with arrays.
|
||||
|
||||
The only prerequisite for installing NumPy is Python itself.
|
||||
#
|
||||
**Step 1: Check if PIP is Installed**
|
||||
|
||||
Before installing NumPy, it's essential to ensure that PIP (Python Package Installer) is installed on your system. PIP is a package management system used to install and manage Python packages. You can verify if PIP is installed by running a simple command in your terminal or command prompt.
|
||||
|
||||
```bash
|
||||
pip --version
|
||||
```
|
||||
|
||||
If PIP is not currently installed on your system, you can install it by visiting the [pypi.org](https://pypi.org/project/pip/) webpage.
|
||||
|
||||
#
|
||||
|
||||
**Step 2: Installing PIP**
|
||||
|
||||
**get-pip.py**
|
||||
|
||||
This is a Python script that uses some bootstrapping logic to install pip.
|
||||
|
||||
Open a terminal / command prompt and run:
|
||||
|
||||
**Linux**
|
||||
```bash
|
||||
python get-pip.py
|
||||
```
|
||||
|
||||
**Windows**
|
||||
```bash
|
||||
py get-pip.py
|
||||
```
|
||||
|
||||
**MacOS**
|
||||
```bash
|
||||
python get-pip.py
|
||||
```
|
||||
|
||||
#
|
||||
|
||||
**Step 3: Installing NumPy**
|
||||
|
||||
NumPy can be installed either through conda or pip.
|
||||
|
||||
If you use pip, you can install NumPy with:
|
||||
|
||||
```bash
|
||||
pip install numpy
|
||||
```
|
||||
|
||||
If you use conda, you can install NumPy from the defaults or conda-forge channels:
|
||||
|
||||
```
|
||||
# Best practice, use an environment rather than install in the base env
|
||||
conda create -n my-env
|
||||
conda activate my-env
|
||||
```
|
||||
|
||||
```
|
||||
# If you want to install from conda-forge
|
||||
conda config --env --add channels conda-forge
|
||||
```
|
||||
|
||||
```
|
||||
# The actual install command
|
||||
conda install numpy
|
||||
```
|
||||
|
||||
You can find more information about how to install [NumPy](https://numpy.org/install/) on numpy.org.
|
||||
|
||||
#
|
||||
|
||||
**Step 4: Check if NumPy is Installed**
|
||||
|
||||
We can utilize the "pip show" command not only to display the version but also to determine whether NumPy is installed on the system.
|
||||
```bash
|
||||
pip show numpy
|
||||
```
|
Ładowanie…
Reference in New Issue