繁体   English   中英

macOS 11.6/Xcode 13 上的诗歌安装失败:dyld:未加载库:@executable_path/../Python3

[英]poetry install fails on macOS 11.6/Xcode 13: dyld: Library not loaded: @executable_path/../Python3

使用官方安装程序在 macOS 11.6/Xcode 13 上安装新诗歌失败:

u@s-MacBook-Pro ~ % curl -sSL https://install.python-poetry.org | python3 -
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/u/Library/Python/3.8/bin

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

Installing Poetry (1.1.12): An error occurred. Removing partial environment.
Poetry installation failed.
See /Users/u/poetry-installer-error-h3v75uw9.log for error logs.
u@s-MacBook-Pro ~ % more /Users/u/poetry-installer-error-h3v75uw9.log
dyld: Library not loaded: @executable_path/../Python3
  Referenced from: /Users/u/Library/Application Support/pypoetry/venv/bin/python3
  Reason: image not found

Traceback:

  File "<stdin>", line 877, in main
  File "<stdin>", line 514, in run
u@s-MacBook-Pro ~ % 

缓存或应用程序支持中没有以前的诗歌安装或对诗歌的引用:

u@s-MacBook-Pro ~ % ls -al Library/Application\ Support/pypoetry
total 0
drwxr-xr-x   2 u  staff    64 26 Jan 16:58 .
drwx------+ 55 u  staff  1760 26 Jan 16:43 ..
u@s-MacBook-Pro ~ % ls -al Library/Caches/pypoetry
ls: Library/Caches/pypoetry: No such file or directory

Python 版本 3.8.9:

u@s-MacBook-Pro ~ % python3 --version
Python 3.8.9
u@s-MacBook-Pro ~ %

Xcode 版本:

u@s-MacBook-Pro ~ % xcodebuild -version
Xcode 13.2.1
Build version 13C100
u@s-MacBook-Pro ~ %

我通过安装 python3 的非系统版本,然后安装诗歌来解决这个问题。

  1. brew install pyenv
  2. pyenv install 3.8.12
  3. pyenv local 3.8.12
  4. curl -sSL https://install.python-poetry.org | python3 -

在我的情况下(Apple M1,macOS 12.4)我克服了这个问题并使用下一个命令成功安装了诗歌

curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python3 - 

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM