Commands |
Description |
python manage.py migrate |
Migrates the changes in the models/forms/etc to the database. |
python manage.py makemigratations |
Migrates the changes in the models/forms/etc to the database. |
python manage.py runserver |
Runs the Server usaully port:8000 |
python manage.py runserver 8080 |
Runs the Server on specfic port |
python manage.py createsuperuser |
Creates a Superuser with full permissions. |
Commands |
Description |
python --version |
Starts Python Interpreter |
python |
Starts Python Interpreter |
exit() |
Exits the Python Interpreter |
python test.py |
Runs the test.py file and return result in terminal or actions the file script. |
python get-pip.py |
Installs Pip |
pip install -U pip |
upgrades pip |
pip search django |
The search command allows you to search through the database of packages in Python’s central
package repository |
pip install [Flask/packagename] |
Installs packages using pip |
pip uninstall [Flask/packagename] |
Uninstalls packages using pip |
pip list |
Lists all the packages within pip |
Commands |
Description |
pip3 install pipenv |
Installs PipEnv environment |
pip3 install virtualenv |
Installs VirtualENV package |
virtualenv [environment-name] |
Creates a virtual Environment |
source [environment-name]/bin/activate |
Activates Virtual Environment |
deactivate |
Deactivates the Virtual Environment |
pipenv install [requests/package] |
Installs requests package or the package you name using pipenv |
pip install [requests/package] |
Installs requests package or the package you name using virtualenv packge |
Commands |
Description |
conda -V |
Checks the version of Anaconda |
conda info --envs |
display the current environments saved |
conda update conda |
Updates all the packages that come pre installed with Anaconda |
conda create -n [yourenvname] python=x.x anaconda |
Creates a virtual Environment In Anaconda |
source activate [yourenvname] |
Activates your chosen Virtual Environment |
conda install -n [yourenvname] [package] |
Install additional Python packages to a virtual environment. |
conda env update –f environment.yml –n your_env_name |
Update the environment |
source deactivate |
Deactivates the Virtual Environment In Anaconda |
conda remove -n yourenvname -all |
Delete a no longer needed virtual environment |