
- Python Basic Tutorial
- Python - Home
- Python - Overview
- Python - Environment Setup
- Python - Basic Syntax
- Python - Comments
- Python - Variables
- Python - Data Types
- Python - Operators
- Python - Decision Making
- Python - Loops
- Python - Numbers
- Python - Strings
- Python - Lists
- Python - Tuples
- Python - Dictionary
- Python - Date & Time
- Python - Functions
- Python - Modules
- Python - Files I/O
- Python - Exceptions
What is the most compatible way to install python modules on a Mac?
The most popular way to manage python packages (if you're not using your system package manager like homebrew) is to use setuptools and easy_install. It is probably already installed on your system. Use it like this:
easy_install django
easy_install uses the Python Package Index which is an amazing resource for python developers. Have a look around to see what packages are available.
A better and more reliable way to install python modules across platforms is to use pip. If you have Python 2 >=2.7.9 or Python 3 >=3.4 installed from python.org, you will already have pip and setuptools, but will need to upgrade to the latest version:
pip install -U pip setuptools
Otherwise:
Download get-pip.py from https://bootstrap.pypa.io/get-pip.py. Run python get-pip.py. This will install or upgrade pip.
Now you can use pip to install python packages. For example, To install the latest version of "SomeProject":
$ pip install 'SomeProject'
To install a specific version:
$ pip install 'SomeProject==1.4'
To install greater than or equal to one version and less than another:
$ pip install 'SomeProject>=1,<2'
- Related Articles
- How to install libxml2 with python modules on Mac?
- How to use pip to install python modules in easy way?
- What is the Best Way to Install Python on a Windows 10 Computer?
- How to install Git On Mac?
- What are the most interesting Python modules?
- How to install NumPy for Python 3.3.5 on Mac OSX 10.9?
- How to install Selenium WebDriver on Mac OS?
- How to install Python modules in Cygwin?
- How to install Matplotlib on Mac 10.7 in virtualenv?
- How to install python modules without root access?
- What is the most efficient way to concatenate many Python strings together?
- What are the most useful Python modules from the standard library?
- Best way to install Docker on Vagrant
- How to install python modules and their dependencies easily?
- How to Install two python modules with same name?
