V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
推荐学习书目
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
swulling
V2EX  ›  Python

Python 环境打包部署到没有Python的机器上

  •  
  •   swulling · May 15, 2013 · 7004 views
    This topic created in 4743 days ago, the information mentioned may be changed or developed.
    问题:在一批没有外网,系统Python版本是2.3的机器上部署Python2.7的程序

    目前的办法:
    批量安装为2.7,并且在root下安装各种库(requests,....)

    理想中的方法:
    将开发机上的python环境打包,然后去这批机器上解压,然后运行python程序

    最好是virtualenv打包,然后再目标机器上直接source bin/activate就可以了


    目前最接近的是:virtualenv --relocatable 但是官方文档说这个不太可靠且未来会移除
    2 replies    1970-01-01 08:00:00 +08:00
    DH
        1
    DH  
       May 15, 2013   ❤️ 1
    如果开发用的机器目录结构什么的和目标机的一样,应该普通的viertualen就能解决问题吧。
    phuslu
        2
    phuslu  
       May 15, 2013
    ActivePython
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3259 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 36ms · UTC 13:42 · PVG 21:42 · LAX 06:42 · JFK 09:42
    ♥ Do have faith in what you're doing.