FreeBSD, Python

Resolve pip for Python 3.4 on FreeBSD

This just newbie problem. I had FreeBSD version 10.2 server. The default installation for python is python 2.7. I had script with python 3 as the interpreter so I install the python 3 from the pkg using

pkg install python34

Another problem is I need another library for the script. I can’t find it using pkg or even from ports (/usr/ports). Python have library package management using pip or easy_install (I use pip). Usually the pip is bundled with the python itself. So the default pip from my python is from older version (python 2.7). I need to install pip first before I add another library for my script. So this is how we add pip from python 3.

python3.4 -m ensurepip

You have to execute the script using root. You can wait the process until finish. After that you can  add another library from your python 3 using new pip. You can execute your new pip with pip3 or pip3.4. This is how I install library for my new python.

pip3.4 install telepot

Try it…

Leave a Reply

Your email address will not be published. Required fields are marked *