File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,19 @@ Creating virtual environments
85
85
without there needing to be any reference to its virtual environment in
86
86
``PATH ``.
87
87
88
+ .. warning :: Because scripts installed in environments should not expect the
89
+ environment to be activated, their shebang lines contain the absolute paths
90
+ to their environment's interpreters. Because of this, environments are
91
+ inherently non-portable, in the general case. You should always have a
92
+ simple means of recreating an environment (for example, if you have a
93
+ requirements file ``requirements.txt ``, you can invoke ``pip install -r
94
+ requirements.txt `` using the environment's ``pip `` to install all of the
95
+ packages needed by the environment). If for any reason you need to move the
96
+ environment to a new location, you should recreate it at the desired
97
+ location and delete the one at the old location. If you move an environment
98
+ because you moved a parent directory of it, you should recreate the
99
+ environment in its new location. Otherwise, software installed into the
100
+ environment may not work as expected.
88
101
89
102
.. _venv-api :
90
103
You can’t perform that action at this time.
0 commit comments