- files for 6/3/2015
This is a quick checklist to install virtualenv and virtualevnwrapper on an OS X or Windows 8.1 machine.
Install pip
- use sudo if needed
- OS X:
pip install -U pip
orsudo easy_install pip
- OS X:
- if on Windows, make sure python is installed.
Install virtualenvwrapper
- depends on pip
- OS X:
sudo pip install virtualenvwrapper
- OS X:
- if on windows, either install virtualenvwrapper-win-1.1.5 or cygwin.
- remember to set the (shell startup file)[http://virtualenvwrapper.readthedocs.org/en/latest/install.html#shell-startup-file]
export WORKON_HOME=$HOME/.virtualenvs
export PROJECT_HOME=$HOME/Devel
source /usr/local/bin/virtualenvwrapper.sh
or, on windows, this might be helpful.
Pull down the basic-python-example repository
- Use the mac client if desired or windows client
cd ~\basic-python-example
This may take a minute or two. On Mac: Xcode needs to be installed.
mkvirtualenv basic-python-example
pip install -r requirements/base.txt
If you run into Xcode (or other errors) when running the install, google it. Sometimes the Xcode license agreement hasn't been accepted
cd ~\basic-python-example\code
workon basic-python-example
- Open a Terminal/Shell
- Go to directory
\basic-python-example\code
- With virtualenv activated (workon basic-python-example)
- Type:
python
- Use these commands: shell_parse.py
- Open a Terminal/Shell
- Go to directory
\basic-python-example\code
- With virtualenv activated (workon basic-python-example)
- Start Flask
python web_01.py
- Go to local Flask server: http://127.0.0.1:5000/
- See file web_01.py
- Assume you are in directory
\basic-python-example\code
with virtualenv activated (workon basic-python-example) - Start Flask
python web_02.py
-
Go to hello with template
- See file web_01.py
-
Go to country list