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