[PYTHON] A memo to create a virtual environment (venv) before Django

Create a web app using Django with python. ↑ For that purpose, first create a virtual environment. Easy 3 steps.

Procedure for creating a virtual environment

The file name of this virtual environment is ** dj_kasou **.

① Create a virtual environment

python -m venv dj_kasou

If it doesn't work on mac

python3 -m venv dj_kasou

### ② There is a virtual environment
cd dj_kasou

### ③ Execute the virtual environment

For Mac:

source bin/activate

** Done. ** **


For Windows:

Scripts\activate

I get a ** PSSecurityException ** error, so execute the following.

Set-ExecutionPolicy RemoteSigned -Scope Process

→ Respond with the execution policy "Y" and execute it again.

Scripts\activate

** Done. ** **



After building the virtual environment, it will be repeated in and out for each work, so make a note of the following command.
Enter the virtual environment file
cd dj_kasou
Run virtual environment
source bin/activate
Enter the working directory in the virtual environment
cd NOWPROJECT
Exit virtual environment
deactivate

## Why do you need a virtual environment in the first place? Prevent troubles caused by different library versions. If you create a virtual environment, you can manage the version for each application.

Recommended Posts

A memo to create a virtual environment (venv) before Django
How to create a Python virtual environment (venv)
[Venv] Create a python virtual environment on Ubuntu
Build a Python virtual environment using venv (Django + MySQL ①)
To myself as a Django beginner (4) --Create a memo app--
Steps to create a Django project
Create a virtual environment with Python!
How to create a virtual bridge
How to develop in a virtual environment of Python [Memo]
[Django] Memo to create an environment of Django + MySQL + Vue.js [Python]
Install Django in a pipenv virtual environment
Let's create a virtual environment for Python
[Python] Create a virtual environment with Anaconda
Effortlessly vscode + venv virtual environment (Windows) memo
Create a virtual environment with Python_Mac version
Add a Python virtual environment to VSCode
What to do if you can't create a virtual environment using venv even though you're following the Django official website
Steps to create a Python virtual environment with VS Code on Windows
How to share a virtual environment [About requirements.txt]
Start Django in a virtual environment with Pipenv
Create a virtual environment with conda in Python
[Memo] Build a virtual environment with Pyenv + anaconda
Build a virtual environment with pyenv and venv
[Note] How to create a Ruby development environment
How to create a Rest Api in Django
Create a Python virtual development environment on Windows
[Note] How to create a Mac development environment
Create a Django schedule
Create a Python environment
[Memo] Django development environment
When I tried to create a virtual environment with Python, it didn't work
Create a Django project and application in a Python virtual environment and start the server
I tried to create a table only with Django
Python: Creating a virtual environment (venv), starting and stopping
Create a virtual environment with Anaconda installed via Pyenv
code-server Online environment (2) Create a virtual network with Boto3
How to build a Django (python) environment on docker
Building and enabling a python virtual environment, etc. (venv)
To myself as a Django beginner (1) --Create a project app--
Create a django environment with docker-compose (MariaDB + Nginx + uWSGI)
Build a Django environment for Win10 (with virtual space)
[Learning memo] How to make an application with Django ~ From virtual environment to pushing to github ~
Django development environment construction memo
Create a homepage with django
Shell to create django project
Building a Python virtual environment
Create a Django login screen
venv: Python virtual environment management
python standard virtual environment venv
Building a Python virtual environment
A memo on how to easily prepare a Linux exercise environment
How to build a new python virtual environment on Ubuntu
[Memo] Build a development environment for Django + Nuxt.js with Docker
[Django3] Display a web page in Django3 + WSL + Python virtual environment
A note on how to load a virtual environment in PyCharm
I want to use a virtual environment with jupyter notebook!
Create a Todo app with Django ① Build an environment with Docker
Create a virtual environment for python on mac [Very easy]
Overview of Python virtual environment and how to create it
I tried to create a server environment that runs on Windows 10
A memo to move Errbot locally