Har*_*oli 9 python python-poetry
运行以下
poetry shell
Run Code Online (Sandbox Code Playgroud)
返回以下错误
/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
Run Code Online (Sandbox Code Playgroud)
我怎样才能克服这个错误?为什么这个命令不起作用?
poetry shell是一个非常有问题的命令,这在维护者中经常被谈论。此特定问题的解决方法是手动激活外壳。可能值得别名以下
source "$( poetry env list --full-path )/bin/activate"
Run Code Online (Sandbox Code Playgroud)
小智 7
这与激活普通的虚拟环境类似。但我们需要找出诗歌虚拟环境的路径。
我们可以通过以下方式找到路径poetry env info --path
source $(poetry env info --path)/bin/activate
Run Code Online (Sandbox Code Playgroud)
在这个诗歌演示中进行了解释。
我必须执行以下操作
source "$( poetry env list --full-path | grep Activated | cut -d' ' -f1 )/bin/activate"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3685 次 |
| 最近记录: |