推荐学习书目
› 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
mutoudaren
V2EX  ›  Python

Python 跨平台和设备 模块管理有什么好方法吗?

  •  1
     
  •   mutoudaren · Oct 15, 2020 · 3948 views
    This topic created in 2215 days ago, the information mentioned may be changed or developed.

    题主现在家,办公室,vps 三个地点使用 python 工作,操作系统有 win 和 linux,使用 conda,但是每次在一个地点新安装了库,在另外一个地点就要重新安装,有什么一劳永逸的方法吗。

    13 replies  •  2020-10-19 17:10:45 +08:00
    Suthree
    Suthree
    Oct 15, 2020
    1
    docker
    wangyzj
    wangyzj
    Oct 15, 2020
    2
    远程桌面
    哦,我突然想到了:无影
    leishi1313
    leishi1313
    Oct 15, 2020 via Android
    3
    code-server
    cealiu
    cealiu
    Oct 15, 2020
    4
    pycharm 可以配置使用远程服务器 python 解释器,有服务器的话配置一下
    mutoudaren
    mutoudaren
    OP
    Oct 15, 2020
    5
    远程的话,就用不了本地的资源了,docker 试一下。
    yucongo
    yucongo
    Oct 15, 2020❤️1
    7
    或许可以用 poetry 管理包,平台之间用 usb 或 rsync 或云同步 poetry 里的 pyproject.toml 。

    其实基本思想和用 github 的 repo 一样。不过用 setup.py 增加包时要人工管理包(更新 setup.py 里的 install_requires 或 requiements.txt ),用 poetry 增加包时自动更新 pyproject.toml 。
    wuwukai007
    wuwukai007
    Oct 15, 2020 via Android
    8
    这跟 docker 没关系吧,开发环境同步的问题,
    linvaux
    linvaux
    Oct 15, 2020 via iPhone
    9
    写个脚本,同步完代码之后,自动安装依赖
    renmu123
    renmu123
    Oct 15, 2020 via Android
    10
    推荐用 poetry 管理,再也不用每次安装完包手动 freeze 了,问就是真香
    zachlhb
    zachlhb
    Oct 15, 2020 via Android
    11
    放 requirements 文件里,一行命令安装的事也没多复杂吧
    mutoudaren
    mutoudaren
    OP
    Oct 19, 2020
    13
    @no1xsyzy 谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1590 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 08:57 · PVG 16:57 · LAX 00:57 · JFK 03:57
    ♥ Do have faith in what you're doing.