Skip to content

Instantly share code, notes, and snippets.

@bartmika
Created September 12, 2015 00:00
Show Gist options
  • Save bartmika/ffc600e0d59be8525e5e to your computer and use it in GitHub Desktop.
Save bartmika/ffc600e0d59be8525e5e to your computer and use it in GitHub Desktop.

FreeBSD 10.2 + Python 3.4.x

Ports

We need to get the most up-to-date repository of ports and apply it to our system.

sudo portsnap fetch extract update

Python 3.4

  1. Become Root
su
  1. Fix the following dependancy problem
cd usr/ports/converters/libiconv
make deinstall clean
make install clean
  1. Compile from source Python 3.4
cd /usr/ports/lang/python34
make install clean
  1. Find where Python was installed
rehash
find /usr/bin /bin/ /usr/local/bin -iname 'python*'
  1. Make the command "python" be available on the FreeBSD system.
ln -s /usr/local/bin/python3.4 /usr/local/bin/python
  1. Verify Python was installed and is version 3.4.x
python -V

Extra Python Libraries

To support "django-simple-captcha" rendering, we will have to install these

  1. Lets make sure we are using the latest setup tools
cd /usr/ports/devel/py-setuptools27
sudo make deinstall clean
cd /usr/ports/devel/py-setuptools34
sudo make install clean
  1. Lets install GD:
cd /usr/ports/graphics/gd
sudo make install clean
  1. Lets install (if it doesn't exist) Curl:
pkg install curl

pip

  1. Lets install pip:
exit
cd ~/
curl -O https://raw.githubusercontent.com/pypa/pip/master/contrib/get-pip.py
sudo python get-pip.py
rm get-pip.py
  1. Verify pip was installed
pip -V

Virtualenv

  1. To install:
sudo pip install virtualenv
  1. Verify virtualenv is intalled
mkdir py-test
cd py-test
virtualenv env
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment