markdown VIRTUALENV

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了markdown VIRTUALENV相关的知识,希望对你有一定的参考价值。

## Virtualenv is a tool that creates isolated Python development environments on your computer. 

So why is this useful? Say you see a Python library that you want to try out. If you installed this library systemwide, you run the risk of messing up other libraries you've installed. Instead, you can use virtualenv to first create an isolated environment and then safely install the library inside this environment without affecting the rest of your computer.

You can then keep this virtual environment around for more development work or simply delete it when you're finished trying it out. Either way, your system remains organized and clutter-free. 

### To install virtualenv, type:  
`pip install virtualenv`

### Once you're inside your project folder, type the command:   
`virtualenv venv`  

Virtualenv is creating a new folder named **venv** that contains a fresh copy of Python and the package installer pip. Once you've done this, activate your new virtual environment so you can begin working inside of it.

### Type:  
`source venv/bin/activate`  

You can see that we're inside the isolated environment because of the **venv** that shows up in front of the prompt. Now that we're inside the isolated environment, we can safely install Flask without affecting the rest of the computer. 

以上是关于markdown VIRTUALENV的主要内容,如果未能解决你的问题,请参考以下文章

markdown VIRTUALENV

markdown pyenv + pyenv-virtualenv

markdown 安装的virtualenv及autoenv

markdown Virtualenv和Anaconda

markdown 创建virtualenv

markdown Python框架与pyenv和virtualenv / venv