Mar 07, 2020. Doing it Right¶. Let’s install a real version of Python. Before installing Python, you’ll need to install GCC. GCC can be obtained by downloading Xcode, the smaller Command Line Tools (must have an Apple account) or the even smaller OSX-GCC-Installer package. Nov 17, 2019.
As a popular open source development project, Python has an activesupporting community of contributors and users that also make their softwareavailable for other Python developers to use under open source license terms.
This allows Python users to share and collaborate effectively, benefitingfrom the solutions others have already created to common (and sometimeseven rare!) problems, as well as potentially contributing their ownsolutions to the common pool.
This guide covers the installation part of the process. For a guide tocreating and sharing your own Python projects, refer to thedistribution guide.
Note
For corporate and other institutional users, be aware that manyorganisations have their own policies around using and contributing toopen source software. Please take such policies into account when makinguse of the distribution and installation tools provided with Python.
Key terms¶
Changed in version 3.5: The use of
venv is now recommended for creating virtual environments.
See also
Basic usage¶
The standard packaging tools are all designed to be used from the commandline.
The following command will install the latest version of a module and itsdependencies from the Python Packaging Index:
Note
For POSIX users (including Mac OS X and Linux users), the examples inthis guide assume the use of a virtual environment.
For Windows users, the examples in this guide assume that the option toadjust the system PATH environment variable was selected when installingPython.
It’s also possible to specify an exact or minimum version directly on thecommand line. When using comparator operators such as
> , < or some otherspecial character which get interpreted by shell, the package name and theversion should be enclosed within double quotes:
Normally, if a suitable module is already installed, attempting to installit again will have no effect. Upgrading existing modules must be requestedexplicitly:
More information and resources regarding
pip and its capabilities can befound in the Python Packaging User Guide.
Creation of virtual environments is done through the
venv module.Installing packages into an active virtual environment uses the commands shownabove.
See also
How do I …?¶
These are quick answers or links for some common tasks.
… install
|
Python Versions | Linux command to install pip |
Advanced Package Tool (Python 2.x) | |
Advanced Package Tool (Python 3.x) | |
pacman Package Manager (Python 2.x) | |
pacman Package Manager (Python 3.x) | |
Yum Package Manager (Python 2.x) | |
Yum Package Manager (Python 3.x) | |
Dandified Yum (Python 2.x) | |
Dandified Yum (Python 3.x) | |
Zypper Package Manager (Python 2.x) | |
Zypper Package Manager (Python 3.x) |
Pip Command | Description |
pip install <package_name> | Install package |
pip download <package_naem> | Download package |
pip uninstall <package_naem> | Uninstall packages |
pip freeze | Output installed packages in requirements format. |
pip list | List installed packages. |
pip show | Show information about installed packages. |
pip check | Verify installed packages have compatible dependencies. |
pip config | Manage local and global configuration. |
pip search | Search PyPI for packages. |
pip wheel | Build wheels from your requirements. |
pip hash | Compute hashes of package archives. |
pip completion | A helper command used for command completion. |
pip debug | Show information useful for debugging. |
pip help | Show help for commands. |
Write something about yourself. No need to be fancy, just an overview.
December 2020
November 2020
October 2020