Heim  >  Fragen und Antworten  >  Hauptteil

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

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

大家讲道理大家讲道理2741 Tage vor416

Antworte allen(2)Ich werde antworten

  • 大家讲道理

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

    Python下有Virtualenv 你可以尝试pip install一下
    还有 建议团队开发时用git

    Antwort
    0
  • PHP中文网

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

    用virtualenv,传代码时,把python的env也拷过来

    Antwort
    0
  • StornierenAntwort