15 C
Texas
angeloma
Senior Writer and partner

How to install python Pip on FreeBSD 12?

Hi, folks. You know we like Unix-based systems and now we will teach you how to install python Pip on FreeBSD 12.

First, we have to explain what Pip is. Pip is a package management system used to install and manage software packages written in Python.

If you use a lot of Python for development, it is highly likely that you will have to use Pip. Similarly, Pip is a terminal tool, so it is also used through commands.

Also, pip is a recursive acronym that can be interpreted as Pip Package Installer or Pip Python Installer.

- Advertisement -

So, let us install it.

Install Python Pip on FreeBSD 12

First, open a terminal session and search the official FreeBSD 12 repositories on pip.

:~$ sudo pkg search pip
py37-apipkg-1.5                Namespace control and lazy-import mechanism
 py37-django-pipeline-1.6.14    Asset (css/js) packaging library for Django
 py37-iterpipes-0.4_1           Library for running shell pipelines using shell-like syntax
 py37-pip-19.1.1                Tool for installing and managing Python packages
 py37-pip-api-0.0.13            Importable pip API
 py37-pip-tools-4.3.0           Keep your pinned dependencies fresh
 py37-pipdeptree-0.13.2         Command line utility to show dependency tree of packages
 py37-pipenv-2018.11.26_1       Python Development Workflow for Humans
 py37-pipreqs-0.4.10            Generate requirements.txt file for any project based on imports
 py37-pytest-azurepipelines-0.8.0 Formatting PyTest output for Azure Pipelines UI
 py37-ufal.udpipe-1.2.0.2_1     Python bindings to UDPipe library for parsing universal treebanks
 rubygem-apipie-bindings-0.2.3  Ruby bindings for API calls that are documented with Apipie
 rubygem-apipie-params-0.0.5    DSL for describing data structures with json-schema bindings
 rubygem-aws-sdk-codepipeline-1.27.0 Official AWS Ruby gem for AWS CodePipeline (CodePipeline)
 rubygem-aws-sdk-datapipeline-1.16.0 Official AWS Ruby gem for AWS Data Pipeline
 rubygem-html-pipeline-2.12.3   GitHub HTML processing filters and utilities
 rubygem-html-pipeline27-2.7.2  GitHub HTML processing filters and utilities
 rubygem-net-http-pipeline-1.0.1 HTTP/1.1 pipelining implementation atop Net::HTTP
 socketpipe-1.10                Zero overhead remote process plumbing
 spiped-1.6.0_4                 Daemon for creating secure symmetric pipes
 vdr-plugin-osdpip-0.1.2_9      Video Disk Recorder - picture-in-picture plugin
 waypipe-0.6.1_1                Network transparency with Wayland
 xpipeman-1.0_4                 Connect the pipes to stop the leakspy37-apipkg-1.5                Namespace control and lazy-import mechanism
 py37-django-pipeline-1.6.14    Asset (css/js) packaging library for Django
 py37-iterpipes-0.4_1           Library for running shell pipelines using shell-like syntax
 py37-pip-19.1.1                Tool for installing and managing Python packages
 py37-pip-api-0.0.13            Importable pip API
 py37-pip-tools-4.3.0           Keep your pinned dependencies fresh
 py37-pipdeptree-0.13.2         Command line utility to show dependency tree of packages
 py37-pipenv-2018.11.26_1       Python Development Workflow for Humans
 py37-pipreqs-0.4.10            Generate requirements.txt file for any project based on imports
 py37-pytest-azurepipelines-0.8.0 Formatting PyTest output for Azure Pipelines UI
 py37-ufal.udpipe-1.2.0.2_1     Python bindings to UDPipe library for parsing universal treebanks
 rubygem-apipie-bindings-0.2.3  Ruby bindings for API calls that are documented with Apipie
 rubygem-apipie-params-0.0.5    DSL for describing data structures with json-schema bindings
 rubygem-aws-sdk-codepipeline-1.27.0 Official AWS Ruby gem for AWS CodePipeline (CodePipeline)
 rubygem-aws-sdk-datapipeline-1.16.0 Official AWS Ruby gem for AWS Data Pipeline
 rubygem-html-pipeline-2.12.3   GitHub HTML processing filters and utilities
 rubygem-html-pipeline27-2.7.2  GitHub HTML processing filters and utilities
 rubygem-net-http-pipeline-1.0.1 HTTP/1.1 pipelining implementation atop Net::HTTP
 socketpipe-1.10                Zero overhead remote process plumbing
 spiped-1.6.0_4                 Daemon for creating secure symmetric pipes
 vdr-plugin-osdpip-0.1.2_9      Video Disk Recorder - picture-in-picture plugin
 waypipe-0.6.1_1                Network transparency with Wayland
 xpipeman-1.0_4                 Connect the pipes to stop the leaks
1.- Search for Pip on the FreeBSD 12 repositories
1.- Search for Pip on the FreeBSD 12 repositories

As we can see we have two versions of Pip. One oriented to be used with Python 3 and the other for Python 2.

In this case, it is best to use the version for Python 3. You can install it with the following command:

:~$ sudo pkg install py37-pip
Updating FreeBSD repository catalogue…
 FreeBSD repository is up to date.
 All repositories are up to date.
 The following 4 package(s) will be affected (of 0 checked):
 New packages to be INSTALLED:
     py37-pip: 19.1.1
     python37: 3.7.6
     libffi: 3.2.1_3
     py37-setuptools: 41.4.0_1
 Number of packages to be installed: 4
 The process will require 125 MiB more space.
 18 MiB to be downloaded.
 Proceed with this action? [y/N]: 
2.- Installing Python Pip on FreeBSD 12
2.- Installing Python Pip on FreeBSD 12

At the end of the installation, you will get some messages from the installer.

Message from py37-pip-19.1.1:
 --
 pip MUST ONLY be used:
 With the --user flag, OR
 To install or manage Python packages in virtual environments 
 Failure to follow this warning can and will result in an inconsistent
 system-wide Python environment (LOCALBASE/lib/pythonX.Y/site-packages) and
 cause errors.
 Avoid using pip as root unless you know what you're doing.

Now Pip is ready to be used. For example, check the current version:

:~$ pip --version
pip 19.1.1 from /usr/local/lib/python3.7/site-packages/pip (python 3.7)
3.- Pip version
3.- Pip version

Although it is already possible to use Pip, it is convenient to upgrade to the latest stable version. This is to take better advantage of the new features and to improve its stability.

To upgrade Pip to the latest stable version, use the following command:

:~$ sudo pip install --upgrade pip --user
Successfully installed pip-20.0.2

There you go. Pip is ready to be used without a problem.

Conclusion

Programming in Python is very widespread and that is why every day there are useful tools made with this language. An easy way to manage these programs made in Python is to install Pip. As you can see it is very easy but it can be very useful to know it.

For more information I recommend you to read the user guide of the program.

Please share this post and join our Telegram channel.

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article