OpenCC icon indicating copy to clipboard operation
OpenCC copied to clipboard

無法於 python 安裝 1.1.4 版 OpenCC

Open EnderWolf50 opened this issue 2 years ago • 13 comments

  • 作業系統: Windows 11
  • Python 版本: 3.10

在 PyPI 上雖然可以看到發布的 1.1.4 版本,但在 pip 上似乎無法成功進行安裝。

使用以下指令:

pip install opencc==1.1.4

獲得輸出:

ERROR: Could not find a version that satisfies the requirement opencc==1.1.4 (from versions: 0.1, 0.2, 1.1.0.post1, 1.1.1)
ERROR: No matching distribution found for opencc==1.1.4

EnderWolf50 avatar Jun 28 '22 08:06 EnderWolf50

遇到相同問題。看起來是 Apple silicon 問題

pip install OpenCC~=1.1.4
ERROR: Could not find a version that satisfies the requirement OpenCC~=1.1.4 (from versions: 0.1, 0.2)
ERROR: No matching distribution found for OpenCC~=1.1.4

shunwen avatar Aug 18 '22 08:08 shunwen

同样问题。同一个命令 pip install OpenCC==1.1.4 在 macbook M1 上无法下载。在 ubuntu 上正常下载。

图片

可以看到 pypi 上只有 x86 架构的预编译。

ERROR: OpenCC-1.1.4-cp310-cp310-macosx_10_9_x86_64.whl is not a supported wheel on this platform.

Update

目前只能用源码编译:

git clone [email protected]:BYVoid/OpenCC.git
cd OpenCC
make python-build
make python-install

kenchou avatar Sep 30 '22 06:09 kenchou

Update

目前只能用源码编译:

git clone [email protected]:BYVoid/OpenCC.git
cd OpenCC
make python-build
make python-install

我看多个相关的issues(#564, #593, #771)都长期没有进展,不清楚问题卡在哪里,但你说的方法好用的,感谢!

yingang avatar Feb 27 '23 10:02 yingang

在 windows 上源码编译:

 python setup.py build_ext bdist_wheel

需要安装 cmake 等工具

imliuruiqi avatar Jul 25 '23 10:07 imliuruiqi

如果需要帮忙编译一个 Apple Silicon 的 Wheel,我可以帮忙,但我没有 pypi 发布权限,可能需要维护者帮忙和指导 @WhiredPlanck @AntonOfTheWoods

laike9m avatar Aug 07 '23 19:08 laike9m

把源码包发布到pypi是不是能解决问题?

frostming avatar Aug 08 '23 08:08 frostming

其实除了自己编译,还有另外一个方法,就是安装一个x86_64的python。感谢python-build-standalone,在release页面下找到 *-x86_64-apple-darwin-lto-full.tar.zst 结尾的,解压到本地目录就可以了。

我自己也做了一个命令行工具,方便大家下载安装,不用自己从400多个文件里找: pbs-installer

frostming avatar Aug 08 '23 08:08 frostming

把源码包发布到pypi是不是能解决问题?

嗯,发布源码包也是可以的

laike9m avatar Aug 08 '23 17:08 laike9m

这个问题有计划解决吗?😥😥

我在尝试部署 shixiangcap/pickpod: Integrated tools to transfer the internet audio to text, extract unpopular views, and pick up podcasts for you. --- shiyangcap/pickpod:集成工具,可将网络音频转换为文本,提取不受欢迎的观点,并为您挑选播客。,里面需要用到 opencc 1.1.6

我的设备是 windows,pip 完全无法安装,最高只到 1.1.1 。。。

尝试自己编译,但各种报错...想问一下有没有 windows 11 直观的解决方案?

zj1123581321 avatar Aug 30 '23 15:08 zj1123581321

我在Apple Silicon/macOS 13.5.1/Python 3.9.6上也遇到這問題了, 而且我這邊是docker-compose build內呼叫pip install, 在本地編譯的完全抓不到. 是否可以考慮公開發佈到pypi呢? 這個PR能修復嗎? 謝謝!

現在在pypi上完全看不到任何新版, 居然只有0.1與0.2?

$ pip3 install opencc==
Defaulting to user installation because normal site-packages is not writeable
ERROR: Could not find a version that satisfies the requirement opencc== 
(from versions: 0.1, 0.2)

xjlin0 avatar Sep 08 '23 01:09 xjlin0

如果需要帮忙编译一个 Apple Silicon 的 Wheel,我可以帮忙,但我没有 pypi 发布权限,可能需要维护者帮忙和指导 @WhiredPlanck @AntonOfTheWoods

@laike9m 我了解我們都沒有權限上傳正式pypi, 是否你可以上傳wheel到testpypi試看看? 這樣在官方解法出現前Apple Silicon的使用者可以暫時用testpypi? 謝謝!

xjlin0 avatar Sep 09 '23 17:09 xjlin0

如果需要帮忙编译一个 Apple Silicon 的 Wheel,我可以帮忙,但我没有 pypi 发布权限,可能需要维护者帮忙和指导 @WhiredPlanck @AntonOfTheWoods

@laike9m 我了解我們都沒有權限上傳正式pypi, 是否你可以上傳wheel到testpypi試看看? 這樣在官方解法出現前Apple Silicon的使用者可以暫時用testpypi? 謝謝!

test pypi 应该也是要权限的吧

laike9m avatar Sep 10 '23 16:09 laike9m

這個PR能修復嗎? 謝謝!

xjlin0 avatar Mar 30 '24 22:03 xjlin0