PHP
0
Python - 安装sentencepiece异常
C:\Users\Administrator>pip sentencepiece==0.1.94
ERROR: unknown command "sentencepiece==0.1.94"
E:\ai\CPM>python http_service.py --port 8085 --model_path model/zuowen_epoch40 --context_len 200
Traceback (most recent call last):
File "http_service.py", line 1, in
import torch
ModuleNotFoundError: No module named 'torch'
正确的torch安装命令
pip install torch -f https://download.pytorch.org/whl/torch_stable.html -i https://pypi.doubanio.com/simple
下边是错误的提示。
You are using pip version 18.1, however version 21.3.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
使用 python -m pip install --upgrade pip 先升级pip 升完级后再装 正确的torch安装命令
E:\ai\CPM>python -m pip install --upgrade pip
Collecting pip
Downloading https://files.pythonhosted.org/packages/a4/6d/6463d49a933f547439d6b5b98b46af8742cc03ae83543e4d7688c2420f8b/pip-21.3.1-py3-none-any.whl (1.7MB)
100% |████████████████████████████████| 1.7MB 1.6MB/s
Installing collected packages: pip
Found existing installation: pip 18.1
Uninstalling pip-18.1:
Successfully uninstalled pip-18.1
Successfully installed pip-21.3.1
版权声明:除非特别标注原创,其它均来自互联网,转载时请以链接形式注明文章出处。