在python中pip安装boto3

安装:

https://aka.ms/vs/16/release/vc_redist.x64.exe
安装之后重启。

 

pip install scikit-learn -i https://pypi.tuna.tsinghua.edu.cn/simple

 

如何在python中pip安装boto3
 
在python目录cmd下输入:
pip install botocore -i pip install boto3  -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install boto3 -i pip install boto3  -i https://pypi.tuna.tsinghua.edu.cn/simple

 

导入成功:

 运行错误:

E:\_p-PyTorch> python pretrain_run.py --model bert
Traceback (most recent call last):
  File "pretrain_run.py", line 5, in <module>
    from pretrain_eval import train, init_network
  File "E:\_-PyTorch\pretrain_eval.py", line 6, in <module>
    from sklearn import metrics
ModuleNotFoundError: No module named 'sklearn'

 

PS E:\_prjct\Chinese-Text-Classification-PyTorch> E:\Eprogramfiles\Anaconda3\python.exe pretrain_run.py -
-model bert
Microsoft Visual C++ Redistributable is not installed, this may lead to the DLL load failure.
                 It can be downloaded at https://aka.ms/vs/16/release/vc_redist.x64.exe
Model name './bert_pretrain' was not found in model name list (bert-base-uncased, bert-large-uncased, ber
t-base-cased, bert-large-cased, bert-base-multilingual-uncased, bert-base-multilingual-cased, bert-base-c
hinese). We assumed './bert_pretrain\vocab.txt' was a path or url but couldn't find any file associated t
o this path or url.
Loading data...
0it [00:00, ?it/s]
Traceback (most recent call last):
  File "pretrain_run.py", line 28, in <module>
    train_data, dev_data, test_data = build_dataset(config)
  File "E:\_prjct\Chinese-Text-Classification-PyTorch\pretrain_utils.py", line 36, in build_dataset      
    train = load_dataset(config.train_path, config.pad_size)
  File "E:\_prjct\Chinese-Text-Classification-PyTorch\pretrain_utils.py", line 20, in load_dataset       
    token = config.tokenizer.tokenize(content)
AttributeError: 'NoneType' object has no attribute 'tokenize'
PS E:\_prjct\Chinese-Text-Classification-PyTorch>

 

posted @ 2023-10-08 08:46  emanlee  阅读(346)  评论(0编辑  收藏  举报