Cause: Python's Frame update iteration is fast and sometimes requires multiple versions of a frame on the computer.Installation:Pip Install VirtualenvOpening up new virtual environmentsvirtualenv [Virtualenv-name]Activating a virtual
Transferred from: Edwardgui's Blog
The normal use of Python to compile the console is not garbled, but in the case of using a virtual environment, Chinese is always garbled, the first thought is the Windows console encoding problem. Looking
After reading the need9Minutes1. What is a virtual environment?The meaning of virtual environment, like a virtual machine, it can be implemented in different environments, Python dependencies are independent of each other, non-interference. This
1. Why use a Python virtual environmentThe actual work, we touch the Python version and the relevant version of the Web framework is often different, such as some combinations may be python2 + Django1.8, some may be python3.6 + Django1.12, two is OK,
Reasons to use Virtualenv:1. python2.7 and python3.5 are present in the ubuntu16.04 system by default. If you choose to install python3.6 the Python version is much more, and to avoid the effects of the Python version, you can use Virtualenv and
Virtual environments ensure that dependencies from one Python application don ' t overwrite the dependencies of another APPL Ication. In this lesson, you'll learn how to create a virtual environment, switch between virtual environments, and manage
sudo apt-get install python-virtualenv
Virtualenv Py2
CD Py2
CD bin
Start the virtual environment: source Activate
Deactivate
Virtualenv-p/usr/bin/pyhon3 Py3
CD Py3
CD bin
SOURCE Activate
Pip
This article mainly introduces the Python virtual Environment virtualenv Concise course, this article integrates two articles about the use of virtualenv tutorial, I believe that we can learn how to use the virtualenv, need friends can refer to the
Installationsudo apt install virtualenvOriginally used PIP3 installed virtualenv, but the use of the time will still be prompted to find.Create a virtual environmentsudo virtualenv -p /usr/bin/python3.6 venv_name #venv_name即为虚拟环境名称
Here,
Installing Virtualenv$ sudo pip install virtualenvThen create a test directory:$ mkdir testvirtual$ cd testvirtualYou can successfully create a virtual environment ENV1:$ virtualenv env1 You can successfully create another virtual environment env2:$
Access to local variables in functionsAfter parsing the function parameters, let's take a look at how the local variables of the function are implemented in Python. As mentioned earlier, the function parameter is also a local variable. Therefore,
Python and C call each otherWhile Python development is highly efficient, it is not very performance as a scripting language, so in order to take into account development efficiency and performance, it is common to implement high performance modules
While Python development is highly efficient, it is not very performance as a scripting language, so in order to take into account development efficiency and performance, it is common to implement high performance modules in C or C + + or run Python
A Brief Introduction to the Python Django framework dj-scaffold Project
This article briefly introduces the dj-scaffold project of the Python Django framework, which is used to assist in directory settings of the Django framework. For more
1. A simple exampleLet's start with a simple example that contains two files foo.py and demo.py[foo.py]def add (A, B):Return a + b[demo.py]Import FooA = [1, ' Python ']A = ' A string 'def func ():A = 1b = 257Print (A + B)Print (a)if __name__ = = ' __
This article briefly introduces the dj-scaffold project of the Python Django framework, which is used to assist in directory settings of the Django framework, for more information, see Django's failure to specify the directory structure
1. Operation ProcessThe Python source program is run, not directly to the machine to run, but first to the Python virtual machine (through the C language), and then interpreted by the Python virtual machine as a machine-readable instruction to run;--
Brief introductionDescribes the initialization and exit of Python virtual machines, the creation of objects for Python basic data types, and the conversion of data types between C and Python.Initialization and exit of Python virtual machinesThe
1.virtualenv Tools Introduction
In our daily Python project development, for example, in addition to flask based projects, there will be other projects to use Python. As the project grows, it faces problems using different versions of Python, or at
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.