1.在安装text_mining_tools时候需要安装stanza模块时出现的问题
1.开始使用了python3.5,发现无法调用stanza,查阅得知,stanza不支持3.6以下版本(stanza无download模块)
2.使用python3.6进行安装
pip install stanza -i https://pypi.tuna.tsinghua.edu.cn/simple/
使用报错信息为:
running build_rust
error: can't find Rust compiler
If you are using an outdated pip version, it is possible a prebuilt wheel is available for this package but pip is not able to install from it. Installing from the wheel would avoid the need for a Rust compiler.
To update pip, run:
pip install --upgrade pip
and then retry package installation.
If you did intend to build this package from source, try installing a Rust compiler from your system package manager and ensure it is on the PATH during installation. Alternatively, rustup (available at https://rustup.rs) is the recommended way to download and update the Rust compiler toolchain.
----------------------------------------
ERROR: Failed building wheel for tokenizers
Failed to build tokenizers
ERROR: Could not build wheels for tokenizers, which is required to install pyproject.toml-based projects
通过上面报错信息:给出了两条解决方案,
1.为安装rust
2.为更新pip
通过
easy_install pip
更新,发现pip版本已经最新,无法更新
则去重新安装rust,后发现cmd无法调用rust,不知道是配置原因还是啥
最后是更新了python版本更新为3.7解决了这个问题。
import stanza
stanza.download('en')
2.期间出现过的问题
Script file 'G:\Anaconda\envs\py36\Scripts\pip-script.py' is not present.
报错,我是用过curl
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
再更新pip解决的,其中-o xxx.py,为保存源文件
2.当python文件版本不对,可以直接使用anaconda构建虚拟环境
conda create -n xxx python=3.7
conda info --envs
activate xxx
##如果想升级anaconda原环境版本
conda install python=3.8
3.当安装pip时,出现多个版本pip
报错:
WARNING: Ignoring invalid distribution -ip(地址)
解决方案:删除地址中~开头的文件
https://blog.csdn.net/weixin_43848614/article/details/118426100
国内源:
清华:https://pypi.tuna.tsinghua.edu.cn/simple/
豆瓣:https://pypi.douban.com/simple
阿里:https://mirrors.aliyun.com/pypi/simple