pip安装本地文件
I do a lot of development without an internet connection1, so being able to install packages into a virtual environment without a connection to PyPI is pretty useful.
I've got a couple of aliases in my .bashrc which help with this2:
alias pipcache='pip install --download ${HOME}/.pip-packages'
alias pipinstall='pip install --no-index --find-links=file://${HOME}/.pip-packages/'
The first downloads the packages to my local cache, the second installs them from the cache.
Usage is probably fairly obvious:
pipcache Django==1.5 # Put Django-1.5.tar.gz in ~/.pip-packages
pipinstall Django==1.5 # Install ~/.pip-packages/Django-1.5.tar.gz
pipcache -r requirements.txt # Cache all the requirements of a project
pipinstall -r requirements.txt # Install all requirements from the cache
It's perfectly possible to cache multiple versions of the same package3, which is useful for being able to test upgrading to newer releases, whilst still being able to revert to the previously pinned package if you find nothing works.
Since I mostly use a fairly small set of packages, this means I can start up a brand new virtualenv and I'm very likely to have everything I need without going to PyPI. Not having to download large packages makes installs quicker too4.
pip安装本地文件的更多相关文章
- python中的各个包的安装,用pip安装whl文件
在安装之前,一直比较迷惑究竟如何用,安装完后,发现竟然如此简单 首先我一般用的是python27,官网下载python27msi安装window7 64位后,已经自带了Pip 和 easy_insta ...
- python pip 安装库文件报错:pip install ImportError: No module named _internal
解决方法: pip2.7, you can at first curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py then python2. ...
- windows下安装easy_install, pip 及whl文件安装方法
转:http://www.cnblogs.com/wu-wenmin/p/4250330.html 写在前面的话 最近在看"Computer Vision with Python" ...
- 云服务器--linux系统操作命令以及安装ngnix记录,以及手动部署本地文件
1.控制台登陆服务器,需要首先知道服务器ip和密码,,命令是 ssh root@1.1.1.1(服务器IP),然后输入密码登入服务器 2.查看linux 版本的系统命令是 cat /etc/redha ...
- paramiko模块的安装和使用(含上传本地文件或文件夹到服务器,以及下载服务器文件到本地)
安装和使用分两步介绍: 介绍一下,本文的运行环境是win7 64位 和python 2.7 . 安装: WIN7_64位 安装python-ssh访问模块(paramiko)的安装教程,本人亲测下面 ...
- Python中怎样用pip安装外部主机文件
在python中安装非自带python模块.有三种方式: easy_install pip 下载压缩包(.zip, .tar, .tar.gz)后解压, 进入解压缩的文件夹后运行python setu ...
- Git安装及密钥的生成并上传本地文件到GitHub上
之前用的GitHub,不太熟练,一直在上传的过程中遇到了一些问题,看了网上诸多教程,总觉得很乱,特参考一些资料,总结了一篇完整的操作步骤,从下载安装到上传文件,亲测有效 1.下载Git软件:https ...
- 在windows下使用pip安装python包遇到缺失stdint.h文件的错误
今天在windows上使用pip安装一个python包python-lzf时遇到如下的错误: fatal error C1083: Cannot open include file: 'stdint. ...
- 导出pip安装的所有放入一个文件中,并把通过这个安装所有的包
导出pip安装的所有的包: pip freeze > piplist.txt 在新的环境中安装导出的包 pip install -r piplist.txt
随机推荐
- linux系统如何安装vmware Tools(下面以CentOS为例)
VMwareTools是VMware虚拟机中很重要的一个工具包,有些时候在虚拟机中安装完操作系统会缺少网卡驱动,不能上网,这时只要安装VMwareTools就可以解决问题,下面以CentOS为例,来说 ...
- JSON_UNESCAPED_UNICODE
JSON_UNESCAPED_UNICODE(中文不转为unicode)
- 如何将.crt的ssl证书文件转换成.pem格式
如何将.crt的ssl证书文件转换成.pem格式 摘自:https://www.landui.com/help/show-8127 2018-07-04 14:55:41 2158次 准备:有一台安装 ...
- es学习-映射管理
2.2.1 增加映射 url:http://192.168.0.108:9200/yingshe/_mapping/user/(前提 索引存在,如索引不存在 请按照上一篇创建索引添加映射) 参数: { ...
- SQL Server数据库大型应用解决方案总结(转)
出处:http://tech.it168.com/a2012/0110/1300/000001300144.shtml [IT168 技术]随着互联网应用的广泛普及,海量数据的存储和访问成为了系统设计 ...
- NArrange 配置与使用
1. 在VS中设置一下就可以用了 2.It is also recommended to setup a restore command using the same parameters, repl ...
- ubuntu 13.04编译安装xen4.4总结
之前在ubuntu14.04上安装xen4.4失败,提示编译有问题,这次换了成了ubuntu13.04进行安装,成功完成xen4.4的安装 1. 安装环境 操作系统:ubuntu13.04 xen版本 ...
- 用Docker搭建WordPress
环境准备 CentOS 安装docker https://yeasy.gitbooks.io/docker_practice/content/install/centos.html docker-co ...
- Word文档如何发CSDN博客
目前大部分的博客作者在写博客这件事情上都会遇到以下3个痛点:1.所有博客平台关闭了文档发布接口,用户无法使用Word,Windows Live Writer等工具来发布博客.2.发布到博客或公众号平台 ...
- Computer Vision with Matlab
PPT: https://max.book118.com/html/2016/0325/38682623.shtm Code: http://www.pudn.com/Download/item/id ...