Virtual Environments ensure that dependencies from one Python application don’t overwrite the dependencies of another application. In this lesson, you will learn how to create a virtual environment, switch between virtual environments, and manage dependencies within a virtual environment.

Install:

pip install virtualenv

Create floder for a project:

mkdir my_project
cd my_project

Use virtual env to generate python env:

virtualenv py3 -p /usr/local/bin/python3

Tell to use python3. Then it will create py3 folder.

To activate the env:

source py3/bin/activate

To deactivate

deactivate

To share the dependiences:

pip freeze > requirements.txt
pip install -r requirements.txt

So other developers can use the same dependiences

[Python] Manage Dependencies with Python Virtual Environments的更多相关文章

  1. django 1.7之后python manage.py syncdb没有了

    在命令行输入python manage.py createsuperuser按照提示输入即可记得先初始化表. django>1.7 python manage.py makemigrations ...

  2. python manage.py shell之后的一些错误:

    1. 在执行python manage.py shell之后的一些错误: wyl@wyl:~/myobject$ python manage.py shell /usr/lib/python2.7/d ...

  3. Django orm 中 python manage.py makemigrations 和 python manage.py migrate 这两条命令用途

    生成一个临时文件 python manage.py makemigrations 这时其实是在该app下建立 migrations目录,并记录下你所有的关于modes.py的改动,比如0001_ini ...

  4. python manage.py shell 的增删改查

    python manage.py shell 的增删改查 guoguo-MacBook-Pro:myblog guoguo$ python manage.py shell Python 3.5.1 ( ...

  5. [译]The Python Tutorial#12. Virtual Environments and Packages

    [译]The Python Tutorial#Virtual Environments and Packages 12.1 Introduction Python应用经常使用不属于标准库的包和模块.应 ...

  6. django源码分析 python manage.py runserver

    django是一个快速开发web应用的框架, 笔者也在django框架上开发不少web应用,闲来无事,就想探究一下django底层到底是如何实现的,本文记录了笔者对django源码的分析过程 I be ...

  7. 启动python解释器的命令(python manage.py shell和python的区别)

    如果你曾经使用过Python,你一定好奇,为什么我们运行python manage.py shell而不是python.这两个命令都会启动交互解释器,但是manage.py shell命令有一个重要的 ...

  8. django(python manage.py imgrate)同步数据库出错后的解决办法

    问题 很多情况下,因为app的models.py的文件内容有误,但是通过python   manage.py    check检查不出来时,当执行python   manage.py    migra ...

  9. python manage.py runserver指定端口和ip

    python manage.py runserver 0.0.0.0:8000 在本地运行程序,python manager.py runserver打开http://127.0.0.1:5000端口 ...

随机推荐

  1. hdu_2795,线段树,单点更新

    #include<iostream> #include<cstdio> #include<cstring> #define lson l,m,rt<<1 ...

  2. 3.IntelliJ IDEA 使用详解

    转自:https://blog.csdn.net/wl_627292578/article/details/53796226 目录结构: InteliJ IDEA 没有工作空间的概念 project ...

  3. 关于Mantle使用个人的一些见解

    前一个月,我接触到了Mantle,由于项目采用的是MVC的设计模式,选用好的model也是至关重要的.先介绍下Mantle的使用吧. 首先定义好数据模型: @property (nonatomic, ...

  4. jqueryEasyUI form表单提交的一个困惑

    今天用到了jqueryEasyUI的form表单做一个增加操作的提交,想打开调试(用的是火狐)看看传的参数,但是怎么也看不到form表单提交的http请求?而且还会发送一个另外的请求! 在页面加载时, ...

  5. 离奇失踪的WM_HOTKEY消息--浅析WIN32消息队列

    故事的开端有些平淡,眼红于XXX小程序,认为写完该程序就有了和心仪的妹子多相处的机会,必须搞,必须酷,按钮不能有,界面得隐藏,这就想到了全局快捷键. 注册调用RegisterHotKey(m_hWnd ...

  6. vue computed自动计算

    <!DOCTYPE html> <html> <head> <title>vue</title> <meta charset=&quo ...

  7. SSD-实现

    一.制作voc数据集 1.数据集文件夹 新建一个文件夹,用来存放整个数据集,或者和voc2007一样的名字:VOC2007 然后像voc2007一样,在文件夹里面新建如下文件夹: 2.将训练图片放到J ...

  8. caffe(1) 网络结构层参数详解

    prototxt文件是caffe的配置文件,用于保存CNN的网络结构和配置信息.prototxt文件有三种,分别是deploy.prototxt,train_val.prototxt和solver.p ...

  9. SPOJ 7258 SUBLEX 后缀数组 + 二分答案 + 前缀和

    Code: #include <cstdio> #include <algorithm> #include <cstring> #define setIO(s) f ...

  10. bzoj1604 牛的邻居 STL

    Description 了解奶牛们的人都知道,奶牛喜欢成群结队.观察约翰的N(1≤N≤100000)只奶牛,你会发现她们已经结成了几个“群”.每只奶牛在吃草的时候有一个独一无二的位置坐标Xi,Yi(l ...