运行以下程序
poetry shell返回以下错误
/home/harshagoli/.poetry/lib/poetry/_vendor/py2.7/subprocess32.py:149: RuntimeWarning: The _posixsubprocess module is not being used. Child process reliability may suffer if your program uses threads.
"program uses threads.", RuntimeWarning)
The currently activated Python version 2.7.17 is not supported by the project (^3.7).
Trying to find and use a compatible version.
Using python3 (3.7.5)
Virtual environment already activated: /home/harshagoli/.cache/pypoetry/virtualenvs/my-project-0wt3KWFj-py3.7我怎样才能克服这个错误?为什么这个命令不起作用?
发布于 2020-03-08 01:29:12
poetry shell是一个非常容易出错的命令,这在维护人员中经常被提及。此特定问题的解决方法是手动激活shell。可能有必要给下面的代码加上别名
source "$( poetry env list --full-path )/bin/activate"发布于 2020-06-22 18:18:41
我必须执行以下操作
source "$( poetry env list --full-path | grep Activated | cut -d' ' -f1 )/bin/activate"发布于 2021-09-16 07:23:19
它类似于激活一个普通的虚拟环境。但我们需要找出诗歌虚拟环境的路径。
我们可以通过poetry env info --path找到路径
source $(poetry env info --path)/bin/activate在this poetry demo中解释。
https://stackoverflow.com/questions/60580332
复制相似问题