Home IT Linux Windows Database Network Programming Server Mobile  
  Home \ Linux \ Python virtual environment: Virtualenv     - Via Twitter how open source library to be used anywhere Emoji emoticons (Linux)

- Fedora 20 Installation and Configuration (Linux)

- Java reflection technology explain (Programming)

- Linux Regular expressions grep and egrep (Linux)

- Linux firewall iptables beginner tutorial (Linux)

- Json Applications of FastJson (Programming)

- 2 minutes to read large data framework Hadoop and Spark similarities and differences (Server)

- Let CentOS perform PPPoE dial-up, ADSL can be used in a network environment! (Linux)

- Oracle 11g DataGuard service to start automatically (Database)

- CentOS7 set boot directly into the command line interface (Linux)

- The ORA-01113 error is handled with BBED without archiving (Database)

- Linux environment variable configuration and save places (Linux)

- Some safety precautions of Linux servers (Linux)

- Oracle PL / SQL selective basis (IF CASE), (LOOP WHILE FOR) (Database)

- Netapp storage routine inspections and information gathering (Linux)

- Ubuntu file security removal tool (Linux)

- Spacewalk remove packages install the update (Linux)

- Teach you to diagnose problems with strace (Linux)

- floating IP in OpenStack neutron (Server)

- The free command in Linux (Linux)

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

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

sudo apt-get install python-virtualenv

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

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:

Pip or let in the implementation of the system automatically turn on the virtual environment:


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. ...

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

You can also use

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
- Oracle archive log deletion (Database)
- CentOS 6.5 using Virtualenv under development environment to build Python3 (Linux)
- MySQL function: group_concat () function (Database)
- Eight kinds of techniques to solve hard problems Linux (Linux)
- Port Telnet command to detect the remote host is turned on (Linux)
- Based on OpenSSL for HTTPS service configuration (Server)
- Installation and Configuration rsync server under CentOS 6.3 (Server)
- CoreCLR compiled in Linux CentOS (Linux)
- Hadoop upload files error solved (Server)
- Linux System Getting Started Learning: The Linux anacron command (Linux)
- Nginx load balancing configuration (http proxy) (Server)
- DDOS Attacks and Prevention (Linux)
- Under Ubuntu on how to use iptables firewall (Linux)
- Detailed usage history command (Linux)
- dd command: do hard disk IO performance test (Linux)
- Security experience: to see how the experts deal with DDoS attacks (Linux)
- Linux installation and configuration curl command tool (Linux)
- To setup a ftp server under Linux (Server)
- Linux disk partition batch format mount script (Linux)
- Security enhancements in Ubuntu ssh service (Linux)
  CopyRight 2002-2016 newfreesoft.com, All Rights Reserved.