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. vncserverpassword改动

    前几天去客户现场,客户说有測试库.Linux下的,帮忙给新建一个数据库,我这么热心的人.是吧 那就開始吧. 一般使用vnc搞图形安装.熟练的打开vnc.输入password,报错!!我愣了几秒,忽然反 ...

  2. rest_framework-认证-总结完结篇

    执行过程 APIView() Ruquest() Authentication() OrderView()APIView() def duspatch: self.initial(request) d ...

  3. django 笔记7 多对多

    多对多 方法一 :双外键关联 自定义关系表 自定义 class Host(models.Model): nid = models.AutoField(primary_key=True) hostnam ...

  4. [NOIP2015模拟10.27] [JZOJ4270] 魔道研究 解题报告(动态开点+权值线段树上二分)

    Description “我希望能使用更多的魔法.不对,是预定能使用啦.最终我要被大家称呼为大魔法使.为此我决定不惜一切努力.”——<The Grimoire of Marisa>雾雨魔理 ...

  5. Rain and Umbrellas(dp)

    题目链接 http://codeforces.com/problemset/problem/988/F 令dp[i][j]为走到目标为i处,手里拿着第j把伞,同时注意,在某处可能存在不止一把伞 #in ...

  6. MySQL服务启动:某些服务在未由其他服务或程序使用时将自动停止

    这几天因为工作需求,需要把MySQL请出来,所以将尘封已久的MySQL进行启动.可是事与愿违,兴许是许久没有访问MySQL了,MySQL生气的不理我,并向外抛出一阵阵报错.1.其中一个是:Window ...

  7. python(2) 图像通道,几何变换,裁剪

    一.图像通道 1.彩色图像转灰度图 from PIL import Image import matplotlib.pyplot as plt img=Image.open('d:/ex.jpg') ...

  8. flex属性的取值

    首先明确一点是, flex 是 flex-grow.flex-shrink.flex-basis的缩写.故其取值可以考虑以下情况:flex 的默认值是以上三个属性值的组合.假设以上三个属性同样取默认值 ...

  9. NodeJS学习笔记 (17)集群-cluster(ok)

    cluster模块概览 node实例是单线程作业的.在服务端编程中,通常会创建多个node实例来处理客户端的请求,以此提升系统的吞吐率.对这样多个node实例,我们称之为cluster(集群). 借助 ...

  10. 洛谷1005 【NOIP2007】矩阵取数游戏

    问题描述 帅帅经常跟同学玩一个矩阵取数游戏:对于一个给定的n*m的矩阵,矩阵中的每个元素aij均为非负整数.游戏规则如下: 1.每次取数时须从每行各取走一个元素,共n个.m次后取完矩阵所有元素: 2. ...