Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

無法於 python 安裝 1.1.4 版 OpenCC #701

Open
EnderWolf50 opened this issue Jun 28, 2022 · 13 comments · May be fixed by #797
Open

無法於 python 安裝 1.1.4 版 OpenCC #701

EnderWolf50 opened this issue Jun 28, 2022 · 13 comments · May be fixed by #797

Comments

@EnderWolf50
Copy link

  • 作業系統: 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
@shunwen
Copy link

shunwen commented Aug 18, 2022

遇到相同問題。看起來是 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

@kenchou
Copy link

kenchou commented Sep 30, 2022

同样问题。同一个命令 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 git@github.com:BYVoid/OpenCC.git
cd OpenCC
make python-build
make python-install

@yingang
Copy link

yingang commented Feb 27, 2023

Update

目前只能用源码编译:

git clone git@github.com:BYVoid/OpenCC.git
cd OpenCC
make python-build
make python-install

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

@imliuruiqi
Copy link

在 windows 上源码编译:

 python setup.py build_ext bdist_wheel

需要安装 cmake 等工具

@laike9m
Copy link

laike9m commented Aug 7, 2023

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

@frostming
Copy link

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

@frostming
Copy link

frostming commented Aug 8, 2023

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

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

@frostming frostming linked a pull request Aug 8, 2023 that will close this issue
@laike9m
Copy link

laike9m commented Aug 8, 2023

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

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

@zj1123581321
Copy link

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

我在尝试部署 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 直观的解决方案?

@xjlin0
Copy link

xjlin0 commented Sep 8, 2023

我在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
Copy link

xjlin0 commented Sep 9, 2023

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

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

@laike9m
Copy link

laike9m commented Sep 10, 2023

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

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

test pypi 应该也是要权限的吧

@xjlin0
Copy link

xjlin0 commented Mar 30, 2024

這個PR能修復嗎? 謝謝!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

9 participants