【发布时间】:2021-02-27 22:35:32
【问题描述】:
我正在为我的项目尝试诗歌,并希望将所有虚拟环境存储在一个地方以便于搜索。我似乎无法让这个命令工作:
PS C:\Users\********\pyprojects\******> poetry config virtualenvs.path: "C:\Users\********\pyprojects\.venv"
ValueError
Setting virtualenvs.path: does not exist
at ~\.poetry\lib\poetry\console\commands\config.py:248 in handle
244│ raise ValueError("You must pass exactly 1 value")
245│
246│ return 0
247│
→ 248│ raise ValueError("Setting {} does not exist".format(self.argument("key")))
249│
250│ def _handle_single_value(self, source, key, callbacks, values):
251│ validator, normalizer, _ = callbacks
252│
来自https://python-poetry.org/docs/configuration/:
virtualenvs.path: 字符串 将在其中创建虚拟环境的目录。默认为 {cache-dir}/virtualenvs(Windows 上为 {cache-dir}\virtualenvs)。
我试过用单引号,不带引号。也不工作。我错过了什么?
【问题讨论】:
-
删除冒号:
poetry config virtualenvs.path "C:\Users\********\pyprojects\.venv"
标签: python path virtualenv python-poetry