If you’re a Mac user and want to install Python and other third-party packages on Ubuntu, this article will help you.
However, if you’re using Windows, there are a few things you’ll need to understand first: When installing a package, Python is installed with the default configuration.
You can change this configuration in the pip install command.
pip install pip This command will install the Python package with the defaults and will automatically install the packages you choose.
You’ll also get the option to use a package manager, pip install .
This command creates a symlink to the Python version of the package, which you can use to install other packages.
pip uninstall pip uninstall will uninstall the package and remove it from your PATH environment variable.
pip init-python This command takes a file, called init-py, and will create a python executable that you can then run.
pip upgrade The pip upgrade command will upgrade the Python distribution.
pip deactivate deactivate Python’s package manager and uninstall it from the PATH environment variables.
pip unpack unpacks Python packages.
The unpack command will remove the python package and any packages you’ve installed with pip install.
pip list lists all of the packages installed by default, along with their version numbers.
pip distutils lists Python’s standard libraries, which are compiled into Python packages, as well as the python interpreter.
pip pip install will install Python packages on your system, which includes the default Python version and the Python interpreter.
Note: If you want to upgrade your system to Python 3.4, you’ll have to do this in the installation process, which is not included in pip install above.
pip update will update the Python source tree.
pip delete deletes a package from the pip list.
pip build will build a package for you, which contains a README file with instructions on how to install the package.
pip test will run a Python test suite.
pip tests will test a Python program, which takes a single argument, the program name.
If you type a name like foo.py , then pip test foo.ps , and then run it, you should get a result like foo .
If you run pip test with a list of arguments, pip tests is likely to return a list like foo-tests .
pip install requires that you have a local copy of the Python packages you want installed, or you can install them locally.
You need to run pip install in order to install them, and then pip uninstall to remove them.
pip upgrades will update your Python distribution, which can be done by running pip upgrade .
pip uninstall removes the Python distributions package manager.
pip reinstall will remove packages from your current PATH environment.
pip setup installs your Python package and Python interpreter, and adds the required packages for the Python 2 and 3 interpreter, which will be installed automatically.
pip debootstrap debootstraps your Python installation.
You must run this in order for pip to be able to install dependencies.
pip delauncher removes packages from pip’s repository.
pip check is used to verify whether Python is in the right state for your system.
pip version checks the version of Python installed on your computer.
pip diff diff diffs two versions of the same Python package.
This is used for comparing two versions that are both on the same directory.
You will see differences in the diffs, so you can check that you’re on the right version.
pip dump dumps the version information for the python-3.x package on your terminal.
pip info lists the commands that are currently installed on the system.
You might see something like: pip install , pip uninstall , pip upgrade , pip deauthorit , pip list , pip install-info , pip delaunch , pip remove-info .
Note that these are the commands listed in the default packages installed with python install , not the commands installed in a pip install installation.
The commands pip install and pip uninstall are also included.
pip status displays the version and version number of Python packages installed, as of now, in your current directory.
pip lint checks whether Python’s documentation is up to date.
pip import uses pip’s imports tool to import packages from other packages, or create them.
The import command is very similar to pip import , but instead of importing a package using the package manager python-pkg , you import it using pip’s import command.
If the Python import command returns a list, it means that the package you want imported is already installed.
The command import-python is the same as import-package, except that the command is executed using pip.
To uninstall an imported package, use pip uninstall-package.
The use of the import command does not cause the package to be removed from your Python installations, only the version number returned by the import operation.
To remove an imported file, use python uninstall-file.
To add a file to a Python package, add it to the file system, using pip import-file-from-path.
The file system is a directory