用法:
create(env_dir)
通過指定包含虛擬環境的目標目錄(絕對或相對於當前目錄)來創建虛擬環境。
create
方法將在指定目錄中創建環境,或引發適當的異常。EnvBuilder
類的create
方法說明了可用於子類自定義的鉤子:def create(self, env_dir): """ Create a virtualized Python environment in a directory. env_dir is the target directory to create an environment in. """ env_dir = os.path.abspath(env_dir) context = self.ensure_directories(env_dir) self.create_configuration(context) self.setup_python(context) self.setup_scripts(context) self.post_setup(context)
每個方法
ensure_directories()
、create_configuration()
、setup_python()
、setup_scripts()
和post_setup()
都可以被覆蓋。
相關用法
- Python statistics variance()用法及代碼示例
- Python vars()用法及代碼示例
- Python cudf.core.column.string.StringMethods.is_vowel用法及代碼示例
- Python torch.distributed.rpc.rpc_async用法及代碼示例
- Python torch.nn.InstanceNorm3d用法及代碼示例
- Python sklearn.cluster.MiniBatchKMeans用法及代碼示例
- Python pandas.arrays.IntervalArray.is_empty用法及代碼示例
- Python tf.compat.v1.distributions.Multinomial.stddev用法及代碼示例
- Python numpy.less()用法及代碼示例
- Python tf.compat.v1.distribute.MirroredStrategy.experimental_distribute_dataset用法及代碼示例
- Python Sympy Permutation.list()用法及代碼示例
- Python dask.dataframe.Series.apply用法及代碼示例
- Python networkx.algorithms.shortest_paths.weighted.all_pairs_dijkstra_path用法及代碼示例
- Python scipy.ndimage.binary_opening用法及代碼示例
- Python pyspark.pandas.Series.dropna用法及代碼示例
- Python torchaudio.transforms.Fade用法及代碼示例
- Python dask.dataframe.to_records用法及代碼示例
- Python pyspark.pandas.groupby.SeriesGroupBy.unique用法及代碼示例
- Python distributed.protocol.serialize.register_generic用法及代碼示例
- Python numpy.polynomial.hermite.hermmul用法及代碼示例
注:本文由純淨天空篩選整理自python.org大神的英文原創作品 venv.EnvBuilder.create。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。