本文主要是介绍python安装tokenizers包@FreeBSD,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
tokenizers提供了当今最常用的tokenizers的实现,重点关注性能和多功能性。官网:GitHub - huggingface/tokenizers: 💥 Fast State-of-the-Art Tokenizers optimized for Research and Production
在FreeBSD系统python3.10下直接pip安装tokenizers报错,
pip install tokenizers
Looking in indexes: https://mirror.baidu.com/pypi/simple
Collecting tokenizersUsing cached https://mirror.baidu.com/pypi/packages/59/9a/7ba038f101d74fea0861c8f82e188441fe99b2a26fb0991da35f2850f9f3/tokenizers-0.19.0.tar.gz (320 kB)Installing build dependencies ... doneGetting requirements to build wheel ... donePreparing metadata (pyproject.toml) ... -errorerror: subprocess-exited-with-error× Preparing metadata (pyproject.toml) did not run successfully.│ exit code: 1╰─> [93 lines of output]Updating crates.io indexDownloading crates ...Downloaded darling_macro v0.20.8Downloaded windows-targets v0.52.5Downloaded derive_builder_macro v0.20.0Downloaded monostate-impl v0.1.12Downloaded pyo3-macros v0.21.2Downloaded fastrand v2.0.2Downloaded itoa v1.0.11Downloaded macro_rules_attribute-proc_macro v0.2.0Downloaded memoffset v0.9.1Downloaded rayon-cond v0.3.0Downloaded autocfg v1.2.0Downloaded env_filter v0.1.0Downloaded macro_rules_attribute v0.2.0Downloaded indoc v2.0.5Downloaded monostate v0.1.12Downloaded thiserror-impl v1.0.58Downloaded anstyle v1.0.6Downloaded either v1.11.0Downloaded num-integer v0.1.46Downloaded thiserror v1.0.58Downloaded pkg-config v0.3.30Downloaded darling v0.20.8Downloaded derive_builder_core v0.20.0Downloaded env_logger v0.11.3Downloaded pyo3-build-config v0.21.2Downloaded num-complex v0.4.5Downloaded anstream v0.6.13Downloaded quote v1.0.36Downloaded getrandom v0.2.14Downloaded derive_builder v0.20.0Downloaded tempfile v3.10.1Downloaded bitflags v2.5.0Downloaded proc-macro2 v1.0.81Downloaded ryu v1.0.17Downloaded serde_derive v1.0.198Downloaded log v0.4.21Downloaded num-traits v0.2.18Downloaded pyo3-macros-backend v0.21.2Downloaded matrixmultiply v0.3.8Downloaded darling_core v0.20.8Downloaded indicatif v0.17.8Downloaded pyo3-ffi v0.21.2Downloaded serde v1.0.198Downloaded cc v1.0.94Downloaded numpy v0.21.0Downloaded memchr v2.7.2Downloaded unicode-segmentation v1.11.0Downloaded aho-corasick v1.1.3Downloaded serde_json v1.0.116Downloaded esaxx-rs v0.1.10Downloaded rayon v1.10.0Downloaded regex v1.10.4Downloaded syn v2.0.59warning: spurious network error (3 tries remaining): [28] Timeout was reached (download of `regex-automata v0.4.6` failed to transfer more than 10 bytes in 30s)
于是改为手动安装
下载源代码
git clone https://github.com/huggingface/tokenizers
进入目录并编译安装
cd tokenizers/bindings/pythonpip install -e .
一般这样编译安装之后,后面即使碰到pip安装不同版本的tokenizers,也会顺利通过。
这篇关于python安装tokenizers包@FreeBSD的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!