Create a new virtual environment that is separate from other Python packages
First create a new directory, named XX,
Python3 Operation $:p ython-m venv ll_env
May not succeed
Method One:
Install Virtual environments using PIP install--user virtualenv under Linux
You may be alerted that PIP is not installed
Install PIP and then operate using sudo apt-get install Python-pip
Pip install--user virtualenv to install the virtual machine
No distributions at all found for virtualenv
But I have a problem, so the use of Ubuntu comes with apt to install, sure enough, different system operation commands are different.
sudo apt-get install python-virtualenv
Installation Complete
Method Two:
.....
Installing a standalone virtual machine using the sudo apt-get install python_virtualenv
Create a stand-alone virtual space
Virtualenv ll_env
Activated
Activating the Environment $:source Ll_env/bin/activate (Linux)
(llenv) ...
Ll_env\scripts\activate (under Windows)
Stop using Deactivate
Use Pip install Django in the virtual machine to install Django
Pip Install Django
Use django-admin.py startproject learning_log.
Ls
LS learning_log to enumerate what files were created
Create a project note. Must add
LS to enumerate files (the book says to create files) use dir under Window
Ls
LS Learning_log (Windows has problems, go to Linux)
/**************************************************/
You can include multiple apps in each Django project, like sub-systems, sub-modules, features, and so on, in a large project, independent of each other, but also associated.
All apps share project resources.
Enter the command in the terminal terminal below Pycharm:
Python manage.py Startapp CMDB
Now we are ready to run the Web service.
The command line is in the following way: Python manage.py runserver 127.0.0.1:8000
But in Pycharm, you can do this:
In the Upper toolbar, locate the icon shown below.
Python Web Chapter