virtual environments

Pataasin ang iyong marka sa homework at exams ngayon gamit ang Quizwiz!

requirements.txt

A file in your project folder that tells which language and framework versions to use in your Virtual Environment for your project

mkvirtualenv env_name

A virtualenvwrapper command that: Creates a folder in the current directory which will contain the Python executable files, and a copy of the pip library which you can use to install other packages. (normal command is: virtualenv)

source venv_name /bin/activate

Activates your virtual environment

virtualenv --no-site-packages env_name

Creates a virtual environment in your current directory

pip install -r requirements.txt

Later it will be easier for a different developer (or you, if you need to re-create the environment) to install the same packages using the same versions: pip install -r requirements.txt Remember to exclude the virtual environment folder from source control by adding it to the ignore list.

pip freeze > requirements.txt

This will create a requirements.txt file, which contains a simple list of all the packages in the current environment, and their respective versions. (In order to keep your environment consistent, it's a good idea to "freeze" the current state of the environment packages.) Later it will be easier for a different developer (or you, if you need to re-create the environment) to install the same packages using the same versions with the command: pip install -r requirements.txt

~/dev/recipe_organizer

Your CODE!

~/.virtualenvs What does it hold?

Your virtual environment that contains correct versions of all python languages and frameworks - Python -Django -South

mkvirtualenv --python=python3_path myenv

makes a virtual environment w/ Python3 !!

which python3

shows you where python3 is installed!! /usr/local/bin/python3

pip install --upgrade pip

updates pip

pip install --upgrade setuptools

updates setup tools


Kaugnay na mga set ng pag-aaral

Phases of Wound healing Acute Wound/ Wound Healing

View Set

Microbiology Chapters 1,2,3,4 Microorganisms are best defined as organisms that

View Set

Linux Quiz 1 - Chapter 1-4 / Lecture 1-4

View Set

Ch 41 saunders Pedi calculations

View Set