首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Mac上的诗歌安装失败,说"should_use_symlinks“

Mac上的诗歌安装失败,说"should_use_symlinks“
EN

Stack Overflow用户
提问于 2022-09-21 19:16:13
回答 2查看 3K关注 0票数 3

我正在尝试使用以下命令安装诗歌

代码语言:javascript
运行
复制
curl -sSL https://install.python-poetry.org | python3 -

但它失败了,但有以下例外:

例外:这个python的构建不能在不使用符号链接的情况下创建venv。

下面是详细说明错误的文本。

代码语言:javascript
运行
复制
Retrieving Poetry metadata

# Welcome to Poetry!

This will download and install the latest version of Poetry,
a dependency and package manager for Python.

It will add the `poetry` command to Poetry's bin directory, located at:

/Users/DaftaryG/.local/bin

You can uninstall at any time by executing this script with the --uninstall option,
and these changes will be reverted.

Installing Poetry (1.2.1): Creating environment
Traceback (most recent call last):
  File "<stdin>", line 940, in <module>
  File "<stdin>", line 919, in main
  File "<stdin>", line 550, in run
  File "<stdin>", line 571, in install
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/contextlib.py", line 117, in __enter__
    return next(self.gen)
  File "<stdin>", line 643, in make_env
  File "<stdin>", line 629, in make_env
  File "<stdin>", line 309, in make
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/venv/__init__.py", line 66, in __init__
    self.symlinks = should_use_symlinks(symlinks)
  File "/Library/Developer/CommandLineTools/Library/Frameworks/Python3.framework/Versions/3.9/lib/python3.9/venv/__init__.py", line 31, in should_use_symlinks
    raise Exception("This build of python cannot create venvs without using symlinks")
Exception: This build of python cannot create venvs without using symlinks

我已经安装了符号链接,所以没有这些似乎不是问题所在。有人知道这个错误的原因吗?

EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2022-09-24 01:24:17

这不是最好的解决方案,但如果有,您可以使用Homebrew安装它。我就是这么做的。

代码语言:javascript
运行
复制
brew install poetry
票数 8
EN

Stack Overflow用户

发布于 2022-10-13 07:40:40

我也犯了同样的错误。

在我的例子中,问题在于pyenv设置的python的全局版本不是python3.x。

所以

代码语言:javascript
运行
复制
pyenv global 3.x.x

修好了。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73805879

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档