python:development_workflow
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
python:development_workflow [2016/07/13 02:26] – [Python Development Workflow] mithat | python:development_workflow [2016/07/13 03:19] – [Getting a list of packages in the virtual environment] mithat | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Python Project | + | ====== Python Project Workflow ====== |
- | Node.js has '' | + | To manage project dependencies, |
===== Projects require virtual environments ===== | ===== Projects require virtual environments ===== | ||
Line 9: | Line 9: | ||
- Create a directory for your project: <code bash>$ mkdir ~/ | - Create a directory for your project: <code bash>$ mkdir ~/ | ||
- | - Create a virtual environment for you project: <code bash>$ mkvirtualenv MyProject</ | + | - Create a virtual environment for your project: <code bash>$ mkvirtualenv MyProject</ |
- Enable the virtual environment: | - Enable the virtual environment: | ||
- Install the packages you need: <code bash>$ pip install < | - Install the packages you need: <code bash>$ pip install < | ||
Line 19: | Line 19: | ||
===== Getting a list of packages in the virtual environment ===== | ===== Getting a list of packages in the virtual environment ===== | ||
- | When you want to deploy your project on another machine, you will want to use the same versions of the packages | + | When you want to deploy your project on another machine, you will want the virtual environment on the host to use the same versions of the packages |
- | you used while developing it (i.e., those in the virtual environment). | + | you used while developing it (i.e., those in your virtual environment). |
===== Virtual environments and IDEs ===== | ===== Virtual environments and IDEs ===== | ||
- | What about if you want to use an IDE or other GUI tools? TODO | + | Virtual environments present an added layer of complexity when using IDEs. To run the project within the right environment and to get accurate auto completion and the like, the IDE needs to be aware of the virtual environment it should |
+ | |||
+ | Each IDE is different, so generalized help is tricky. It might work to run the IDE from a shell that has its virtual environment set as desired, but this will run the IDE itself within that environment as well, which may not be what you want. |
python/development_workflow.txt · Last modified: 2017/05/07 15:09 by mithat