11
Mar
10

Python on FreeBSD

In this article, I will be installing the lovely python on FreeBSD system using FreeBSD Port Collection. The Port Collection is a PMS (Package Management System) for installing applications on FreeBSD. In the beginning, we want to obtain the Port Collection and make sure that it’s updated.

One of the easiest way to update the Port Collection is using portsnap command.

portsnap will connect to a remote site and download a snapshot of the Ports Collection into /var/db/portsnap.

#portsnap fetch

If this is the first time to use portsnap, you should extract the “compressed” snapshot into /user/ports. You can check this folder before if you are not sure about it.

#portsnap extract

InĀ  case the snapshop is already populated, you need only to update it and no need for subsequent fetch:

#portsnap update

Tips: portsnap fetch, extract and update can run together (#portsnap fetch update).

Now, to install python we need to find the desired Python port. In our case, python port can be found in /usr/ports/lang/pythonX (where X is the python’s version).

# cd /usr/ports/lang/python26

#make install clean

At this stage, python26 should be installed and can be tested as the following:

#python -V

or

#pkg_info | grep -i python

Last thing I would like to shed some light on is the installation process of the port. The “make install clean” command makes the installation in three steps:

make: to compile the port code

make install: to install the port

make clean: to delete the compilation temporary directories

Happy pythoning!


2 Responses to “Python on FreeBSD”


  1. July 30, 2010 at 1:39 pm

    Chill! I have an information on the the is well!

  2. 2 kyber
    June 9, 2011 at 10:45 am

    thanks man!


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s


Follow

Get every new post delivered to your Inbox.