search

Home  >  Q&A  >  body text

python - 在同一电脑上运行两份相似程序时怎么分别配置环境变量?

我和同学在windows上开发同一个python写的项目,但是由于项目要求,有时他只能把代码用U盘拷到我电脑上来。pycharm运行他的gui.py时,继承的总是我的项目文件,把他的文件路径添加到PYTHONPATH和path里也没反应。该如何设置环境变量?

大家讲道理大家讲道理2876 days ago473

reply all(2)I'll reply

  • 大家讲道理

    大家讲道理2017-04-18 10:35:15

    There is Virtualenv under Python. You can try pip install.
    Also, it is recommended to use git during team development

    reply
    0
  • PHP中文网

    PHP中文网2017-04-18 10:35:15

    Use virtualenv, when transferring code, copy the python env too

    reply
    0
  • Cancelreply