m1 安装 tidevice 成功,执行 tidevice version 报错
- Dominant language
- Python
- Stars
- 2.6k
- Forks
- 469
- PR merge metrics
- No merged PRs in 30d
Description
m1 上安装各种问题啊,希望可以优化解决下
执行安装脚本 `pip3 install -U "tidevice[openssl]"`
`Pillow` 报错,解决方案参考: [苹果Macbook Pro 13 M1芯片安装Pillow的正确姿势
](https://blog.csdn.net/jia611/article/details/111415011)
手动安装 `Pillow`,之后再执行安装脚本,安装成功,最终提示成功 如下:
```txt
Successfully installed cached-property-1.5.2 colored-1.4.2 logzero-1.7.0 pyOpenSSL-20.0.1 tidevice-0.4.8
```
执行 `tidevice version` 报错:
```
Traceback (most recent call last):
File "/Users/admin/Library/Python/3.8/bin/tidevice", line 5, in
from tidevice.__main__ import main
File "/Users/admin/Library/Python/3.8/lib/python/site-packages/tidevice/__init__.py", line 7, in
from ._device import BaseDevice as Device
File "/Users/admin/Library/Python/3.8/lib/python/site-packages/tidevice/_device.py", line 30, in
from PIL import Image
File "/Users/admin/Library/Python/3.8/lib/python/site-packages/PIL/Image.py", line 94, in
from . import _imaging as core
ImportError: dlopen(/Users/admin/Library/Python/3.8/lib/python/site-packages/PIL/_imaging.cpython-38-darwin.so, 2): no suitable image found. Did find:
/Users/admin/Library/Python/3.8/lib/python/site-packages/PIL/_imaging.cpython-38-darwin.so: mach-o, but wrong architecture
/Users/admin/Library/Python/3.8/lib/python/site-packages/PIL/_imaging.cpython-38-darwin.so: mach-o, but wrong architecture
```
查看 `_imaging.cpython-38-darwin.so` 架构
```bash
file /Users/admin/Library/Python/3.8/lib/python/site-packages/PIL/_imaging.cpython-38-darwin.so
```
输出结果
```txt
/Users/admin/Library/Python/3.8/lib/python/site-packages/PIL/_imaging.cpython-38-darwin.so: Mach-O 64-bit bundle x86_64
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Reproduce `tidevice version` on an M1 Mac and start from the import path shown in `tidevice/__main__.py` and `tidevice/_device.py`, where `PIL.Image` fails to load. Trace the dependency architecture mismatch and verify that the command completes successfully with a compatible installation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- cli, mobile-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100