推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
geew
V2EX  ›  Python

python 模块批量安装

  •  
  •   geew · Jun 30, 2014 · 7436 views
    This topic created in 4469 days ago, the information mentioned may be changed or developed.
    场景是, 我有很多的zip以及tar包

    有快捷的方式批量安装这些包么, 不要一个个的解压再安装....累死. bash脚本又不熟悉...

    有直接的的工具么??
    11 replies  •  2014-07-01 12:49:32 +08:00
    Livid
        1
    Livid  
    MOD
    PRO
       Jun 30, 2014 via iPhone
    Google 一下 pip 和 requirements
    likexian
        2
    likexian  
       Jun 30, 2014   ❤️ 1
    pip install `ls dir`

    这样不知道行不行
    geew
        3
    geew  
    OP
       Jun 30, 2014
    @Livid 一直用的pip安装的, 把模块写到requirements里面.
    哈哈 谢谢 pip 可以直接安装tar包的

    但之前用requirements的时候总会遇到问题, -r 安装下来, 如果某个模块安装失败了, 会导致下面的没法安装了, 只得重来, 是我用法有问题么?
    geew
        4
    geew  
    OP
       Jun 30, 2014
    @likexian 哈哈 这个我喜欢 可以的
    timonwong
        5
    timonwong  
       Jun 30, 2014
    @likexian 可行,如果这些源代码包都是自己写的但是没有注册到pypi上的话,不然依赖都在pypi上找,把源码下载下来就无意义了。


    问题就在于两个:
    1. 楼主的这些源码包是pypi上能找到的吗,还是自己写的应用
    2. 有无互联网连接
    timonwong
        6
    timonwong  
       Jun 30, 2014
    @geew
    如果是怕失败之后又重新来的话,尝试升级setuptools,我记得最近的改进应该包括了这个。
    loading
        7
    loading  
       Jun 30, 2014 via Android
    我的windiws内网,在联网电脑装好好,直接复制整个pythin27文件夹……
    geew
        8
    geew  
    OP
       Jul 1, 2014
    @loading 嗯 这个也不失为一个好办法, 但只复制site-packages这个目录就行了吧
    loading
        9
    loading  
       Jul 1, 2014 via Android
    @geew 我是复制lib(还是libs忘了)的,懒!
    aec4d
        10
    aec4d  
       Jul 1, 2014
    看上去是环境的设置和分发问题?何不用vargant试试,辛苦一次就可以了
    aec4d
        11
    aec4d  
       Jul 1, 2014
    额 打错了 vagrant
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   3594 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 00:07 · PVG 08:07 · LAX 17:07 · JFK 20:07
    ♥ Do have faith in what you're doing.