Home PC Games Linux Windows Database Network Programming Server Mobile  
           
  Home \ Linux \ Python virtual environment: Virtualenv     - FFmpeg compiled with only H264 decoding library (Programming)

- How to use SVN to manage our source code (Server)

- Ubuntu 14.04 Nvidia graphics driver installation and settings (Linux)

- Java synchronization mechanism: synchronized, wait, notify (Programming)

- Spring WebSocket Comments (Programming)

- CoreOS Linux introduces Kubernetes kubelet (Server)

- Linux-based Heartbeat high availability configuration httpd service (Server)

- How to use the on-screen keyboard in Linux (Linux)

- How to contribute code on GitHub uploads (Linux)

- Ubuntu Server 14.04 installation Web server (Linux + Apache + MySQL + PHP) (Server)

- Linux use glibc2 library and crypt () function to generate the user password (Programming)

- Debian 7 and Debian 8 users how to install Oracle Java 8 (Linux)

- Automated Password Generator: Linux under a special password generator (Linux)

- Web database security tips (Linux)

- Oracle local user login authentication fails ORA-01031 insufficient privileges (Database)

- Zabbix installation and configuration process (Server)

- Oracle 11.2.0.3 and MySQL5.6 DDL comparison (Database)

- systemctl Command Complete Guide (Linux)

- Install Ubuntu text editor KKEdit 0.2.10 (Linux)

- Https (SSL / TLS) Detailed principles (Server)

 
         
  Python virtual environment: Virtualenv
     
  Add Date : 2016-07-11      
         
         
         
  virtualenv

virtualenv environment for creating standalone Python, Python plurality of mutually independent of each other, it can:
1. Install the new kit in the case without permission
2. The different applications can use different versions of packages
3. Upgrade kit does not affect other applications

installation
sudo apt-get install python-virtualenv

Instructions
virtualenv [virtual environment name]

For example, to create a virtual environment ** ENV **
virtualenv ENV

By default, the virtual environment will depend on the system environment site packages, that is to say the system has been installed third-party package will be installed in the virtual environment, if you do not want to rely on these package, you can add parameters --no-site -packages create a virtual environment
virtualenv --no-site-packages [name of the virtual environment]

Start Virtual Environment
cd ENV
source ./bin/activate

Note that this time will be more than a command line (ENV), ENV virtual environment name, then all modules will only be installed into that directory.

Exit Virtual Environment
deactivate

Python installation kit in a virtual environment

Virtualenv pip comes with installation tools, so you need to install the kit can be run directly:
pip install [package name]

If you do not start the virtual environment, the system also installed pip tool, the kit will be installed in the system environment, in order to avoid this, you can add in ~ / .bashrc file:
export PIP_REQUIRE_VIRTUALENV = true

Pip or let in the implementation of the system automatically turn on the virtual environment:
export PIP_RESPECT_VIRTUALENV = true

Virtualenvwrapper

Virtaulenvwrapper virtualenv is an expansion pack for easier management of the virtual environment, it can be done:
1. Place all in a virtual environment integration directory
2. management (add, delete, copy) Virtual Environment
3. Switch Virtual Environment
4. ...

installation
sudo easy_install virtualenvwrapper

In this case you can not use virtualenvwrapper, virtualenvwrapper default installed in / usr / local / bin Now, you actually need to run the file virtualenvwrapper.sh job, do not worry, open the file and see, there are installation procedures, we operate according to the environment is set up.

1. Create a directory to store the virtual environment
mkdir $ HOME / .virtualenvs

2. ~ / .bashrc add line: export WORKON_HOME = $ HOME / .virtualenvs

3. ~ / .bashrc to add a row: source /usr/local/bin/virtualenvwrapper.sh

4. Run: source ~ / .bashrc

At this point you can use virtualenvwrapper.

Lists the virtual environment list
workon

You can also use
lsvirtualenv

New Virtual Environment
mkvirtualenv [virtual environment name]

Start / switch the virtual environment
workon [virtual environment name]

Delete Virtual Environment
rmvirtualenv [virtual environment name]

Leave the virtual environment
deactivate
     
         
         
         
  More:      
 
- Linux - Common process the command (Linux)
- Oracle DataGuard principles and basic configuration (Database)
- AIX system file security aspects (Linux)
- To assign multiple IP addresses NIC on the CentOS 7 (Linux)
- How to install open source ITIL portal iTOP on CentOS 7 (Server)
- CentOS 7 Test Marathon start Docker container (Server)
- shell script: a key optimization CentOS system (Linux)
- CentOS7 virtual machine settings, and bridging problems (Linux)
- Add a custom encryption algorithm in OpenSSL (Linux)
- Generators and iterators in Python (Programming)
- Android shutdown (reboot) process (Programming)
- Fedora 23 How to install LAMP server (Server)
- CentOS7 install JAVA notes (Linux)
- PHP interview questions of design patterns (Programming)
- Getting Started with Linux system to learn: How do I know which processes are running on the CPU core (Linux)
- Ubuntu 14.04 forget solution root password (Linux)
- Linux Command Tutorial: cat command to view the contents of the file (Linux)
- Docker commonly used commands Description (Linux)
- Debugging with GDB tool Go (Programming)
- Offline (local) Yum source structures (Linux)
     
           
     
  CopyRight 2002-2022 newfreesoft.com, All Rights Reserved.