Support #874
Install a Python Development Environment on FreeBSD
Description
This is a guide for setting up a simple development environment for python with virtualenv on FreeBSD.
Prepare the Environment¶
- Make sure the system is up to date:
pkg update && pkg upgrade
Install Python¶
- Install python and a few dependencies:
pkg install bash python py27-{pip,pkgconfig,setuptools27,virtualenv}
- Create a non-privileged user to develop with:
pw group add pydev pw user add pydev -m -g pydev -s /usr/local/bin/bash -c "Python Dev"
Create Virtualenv¶
- Switch to the python dev user:
su - pydev
- Create a new virtualenv called new_app:
virtualenv new_app
- Activate the new_app virtualenv to begin using it:
source ./new_app/bin/activate
- Install or develop the new_app:
pip install new_app
- When done working in the virtual environment for the moment, deactivate it:
deactivate