诗歌可以通过Pyenv找到Python 2.7
使用诗歌版本:1.1.13尝试通过Pyenv使用Python 2.7.18时会出现以下错误...
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
当本地设置2.7.18时,会发生这种错误(pyenv local 2.7.18
)和全球(pyenv Global 2.7.18
)。在相关目录中运行Python
会启动终端...
Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
但是当我安装Python 3.9.6并将其设置为本地Python版本时,诗歌正常工作!
有人看过吗?我想念什么吗?
With Poetry version: 1.1.13 I get the following error when trying to use Python 2.7.18 via Pyenv...
Python was not found; run without arguments to install from the Microsoft Store, or disable this shortcut from Settings > Manage App Execution Aliases.
This occurs when 2.7.18 is set up locally (pyenv local 2.7.18
) and globally (pyenv global 2.7.18
). Running python
within the directory in question launches the terminal...
Python 2.7.18 (v2.7.18:8d21aa21f2, Apr 20 2020, 13:25:05) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
But when I install Python 3.9.6 and set it as the local Python version, Poetry works perfectly correctly!
Has anyone seen this before? Am I missing something?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
%userProfile%.poetry \ bin \ poetry.bat 正在调用
python3
找不到python2安装。安装诗歌时。_ WHICH_PYTHON
方法(行666)确定poetry.bat中的调用是python3
或python
python 在安装过程中可以通过哪个版本找到python 。如果您已经安装了诗歌,则只需将诗歌文件修改为
python
即可。对于使用Pyenv的将来的安装,请确保将2.7 Python版本设置为全局。%USERPROFILE%.poetry\bin\poetry.bat was calling
Python3
which can't find Python2 installs. When installing Poetry get-poetry.py is called. The_which_python
method (line 666) determines if the call in poetry.bat isPython3
orPython
by which version of Python it finds during the install.If you have already installed Poetry simply modify the poetry.bat file to be
python
. For future installations with Pyenv ensure that a 2.7 Python version is set as global.