Can I move a virtualenv?

后端 未结 7 1459
栀梦
栀梦 2020-11-29 20:30

This question is not a duplicate.

It pertains not just to renaming a virtual environment, but to actually moving it to a different directory, incl

7条回答
  •  一生所求
    2020-11-29 20:55

    BUT ALAS:

    No, you can't simply mv. There are workarounds, but it might be easier to reinstall.

    (my-python-venv)$ /home/me/PeskyPartyPEnvs/pip3 install foaas
    zsh: /home/me/PeskyPartyPEnvs/pip3: bad interpreter: /home/me/Env/my-python-venv/bin/python3: no such file or directory
    (my-python-venv)$ deactivate
    $ 
    

    ... presses enter a lot in frustration, and the following works

    $
    $
    $ pip3 search foaas
    

    Except it is not from my-python-venv, ergo sadness.

    Want to mv your virtualenv and use it, otherwise unmodified?

    Short Answer:

    Well, ya can't.

提交回复
热议问题