Project

General

Profile

Support #874

Install a Python Development Environment on FreeBSD

Added by Daniel Curtis about 8 years ago. Updated over 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Python
Target version:
Start date:
11/28/2016
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

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
    

Resources

Also available in: Atom PDF