YouTip LogoYouTip

Numpy Install

# NumPy Installation\n\nPython The distribution on the official website does not include the NumPy module.\n\nWe can install it using the following methods.\n\n* * *\n\n## Install Using pip\n\nThe easiest way to install NumPy is using the (#):\n\n```bash\npip3 install numpy\n\nHere we use Python3. If you are using Python2, you can use `pip install numpy`.\n\nBy default, it uses the foreign server, which can be slow. We can use the Tsinghua mirror instead:\n\n```bash\npip3 install numpy -i https://pypi.tuna.tsinghua.edu.cn/simple\n\n* * *\n\n## Install Using conda\n\nIf you are using Anaconda environment, you can use conda to install NumPy:\n\n```bash\nconda install numpy\n\nNumPy installed via conda usually comes with optimized math libraries (such as Intel MKL), which can improve performance.\n\nFor more conda commands, refer to: (#).\n\n* * *\n\n## Install from Source\n\nIf you need to install NumPy from source, you can download the source code from the official NumPy GitHub repository: [https://github.com/numpy/numpy](https://github.com/numpy/numpy), enter the extracted directory and execute:\n\n```bash\npython setup.py install\n\n* * *\n\n## Installation Verification\n\nRegardless of which installation method you use, you can verify if NumPy is installed successfully with the following code:\n\n## Example\n\n```python\nimport numpy as np\n\nprint(np.__version__)\n\nIf the installation is successful, it will output the correct version number:\n\n1.26.4\n\n* * *\n\n## Using Existing Distributions\n\nFor many users, especially on Windows, the simplest way is to download the following Python distributions, which include all key packages (including NumPy, SciPy, matplotlib, IPython, SymPy, and other packages that come with Python core):\n\n* (https://www.anaconda.com/download/): Free Python distribution for large-scale data processing, predictive analysis, and scientific computing, dedicated to simplifying package management and deployment. Supports Linux, Windows, and Mac systems.\n* (https://www.enthought.com/products/canopy): Provides free and commercial distributions. Supports Linux, Windows, and Mac systems.\n* [Python(x,y)](https://python-xy.github.io/): A Python distribution suitable for scientific computing and data analysis, specifically provides tools like (https://www.spyder-ide.org/) for scientific computing development work.\n* (https://winpython.github.io/): Another free Python distribution with scientific computing packages and Spyder IDE. Supports Windows.\n* (http://www.pyzo.org/): A free distribution based on Anaconda and IEP's interactive development environment, ultra-lightweight. Supports Linux, Windows, and Mac systems.
← Python Os PathProp Element Nextelementsiblin β†’