Copy complete virtualenv to another pc

后端 未结 4 951
礼貌的吻别
礼貌的吻别 2020-12-29 07:45

I have a virtualenv located at /home/user/virtualenvs/Environment. Now I need this environment at another PC. So I installed virtualenv-clone

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-29 08:31

    Do the following steps on the source machine:

    1. workon [environment_name]
    2. pip freeze > requirements.txt
    3. copy requirements.txt to other PC

    On the other PC:

    1. create a virtual environment using mkvirtualenv [environment_name]
    2. workon [environment_name]
    3. pip install -r requirements.txt

    You should be done.

    Other Resources:

    • How to Copy/Clone a Virtual Environment from Server to Local Machine

提交回复
热议问题