我正在为我的项目尝试诗歌,并希望将所有虚拟环境存储在一个地方,以便于更容易搜索。我似乎不能让这个命令工作:
PS C:Users********pyprojects******> poetry config virtualenvs.path: "C:Users********pyprojects.venv"
ValueError
Setting virtualenvs.path: does not exist
at ~.poetrylibpoetryconsolecommandsconfig.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/:
virtualenv。路径:字符串创建虚拟环境的目录。默认为{cache-dir}/virtualenvs (Windows上为{cache-dir}virtualenvs)。
我尝试用单引号,不带引号。也不管用。我错过了什么?
试试不加冒号:
PS C:Users********pyprojects******> poetry config virtualenvs.path: "C:Users********pyprojects.venv"
^
unnecessary colon
所以你的命令应该是
poetry config virtualenvs.path "C:Users********pyprojects.venv"
好吧,我真傻…
C:Users********pyprojects******> poetry config virtualenvs.path C:Users********pyprojects.venv
不需要引号和冒号