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

windows 下用 pycharm 创建的虚拟环境如何在 mac 下使用

  •  
  •   whuiscool · Oct 23, 2018 · 4503 views
    This topic created in 2898 days ago, the information mentioned may be changed or developed.
    目前工作环境是一台 macbook 和一台 win7 的台式机,前两天在台式机上用 pycharm 创建了个项目,拷贝到 mac 下发现 Scripts 目录下的 activate 报错,当然也是没有 bin 目录的。反之,mac 下创建的项目没有 scripts 目录。
    就想问问有人和我一样的情况吗?该如何解决呢?
    10 replies  •  2018-10-23 16:30:00 +08:00
    PulpFunction
        1
    PulpFunction  
       Oct 23, 2018
    mac 下创建一个虚拟环境,每次拷贝回来就换本地虚拟环境
    或者
    你只拷贝项目资源文件.py 等等,pycharm 的配置文件不要复制
    Fitz
        2
    Fitz  
       Oct 23, 2018
    用 pipenv 啊
    whuiscool
        3
    whuiscool  
    OP
       Oct 23, 2018
    @PulpFunction 谢谢
    whuiscool
        4
    whuiscool  
    OP
       Oct 23, 2018
    @Fitz 谢谢,我去查下资料
    xuegj1010
        5
    xuegj1010  
       Oct 23, 2018
    用 docker 把环境打包
    canwushuang
        6
    canwushuang  
       Oct 23, 2018
    可以尝试用 wsl 开发,pycharm remote 到 wsl,而 mac 上可以 ssh 到 wsl 上同步。
    AManOnShelf
        7
    AManOnShelf  
       Oct 23, 2018
    不要直接打包虚拟环境
    只要打包 requirements.txt 就可以了 或者 conda 的 environment.yml
    qqjt
        8
    qqjt  
       Oct 23, 2018
    重新建个新环境就行了吧
    ifane
        9
    ifane  
       Oct 23, 2018
    直接重建环境,在 win 上导出依赖到 requirements.txt 。 在 mac 上
    ifane
        10
    ifane  
       Oct 23, 2018
    直接重建环境.
    在 win 上导出依赖到 requirements.txt 。 在 mac 上新建环境,并安装依赖就行。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   4362 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 40ms · UTC 09:50 · PVG 17:50 · LAX 02:50 · JFK 05:50
    ♥ Do have faith in what you're doing.