当前位置:网站首页>Win10 drqa installation
Win10 drqa installation
2022-06-13 06:16:00 【Ming ruoxiao River】
DrQA install
Before the installation DrQA Meet some pits , stay windows System ,cenos All installed , It didn't work , Last in Ubuntu To run successfully , I've sorted it out here Ubuntu Installation steps on the system
Vmware install Ubuntu
Vmware The installation steps are simple, so the user doesn't have to say . Then install Ubuntu Here is my version Ubuntu download
I have a desktop version installed here , It is recommended that the memory be as large as possible when installing the system , I run memory with 8G, For storage space 40G, Because the data will be downloaded later 7.5G
Installation of required tools and software
1. Git install
sudo apt-get install git
According to the prompt
apt-get update
An error has been encountered here ( If not, please ignore )
ubuntu Common mistakes –Could not get lock /var/lib/dpkg/lock solve
Install the program through the terminal sudo apt-get install xxx An error occurred when :
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it
The problem may be that another program is running , Causes resources to be locked unavailable . The reason for resource lock may be that the installation or update did not complete normally last time , And then there is this situation , The solution is simple :
Type the following two sentences into the terminal
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock
And then again sudo apt-get install git
You can make it
2. Anaconda install
Anaconda It's a scientific calculation Python Distribution version , Support Linux, Mac, Windows System , It provides package management and environment management functions , It's easy to solve multiple versions python Coexist 、 Switching and various third-party package installation problems .Anaconda utilize an instrument / command conda To carry out package and environment Management of , And it already contains Python And related tools . The installation steps are as follows :
(1) from https://repo.continuum.io/archive/index.html Download the corresponding version of Anaconda edition , Unzip to the specified location and enter the directory .
(2) Run the command bash Anaconda3-5.2.0-Linux-x86_64.sh Installation .
(3) function echo 'export PATH="~/anaconda2/bin:$PATH"' >> ~/.bashrc To configure .
(4) Run the command source ~/.bashrc Make configuration effective .
Command input anaconda -V Verify successful installation
And then the problem ( If not, please ignore )
Ubuntu Next Anaconda3 appear conda:command not found( Command not found )
problem :anaconda: command not found
Solution :
open Terminal
1、 Use command :sudo apt install viminstall vim Text editor
2、 Use command :vim ~/.bashrcModify environment variables
3、 Add a command at the end of the text :export PATH=~/anaconda3/bin:$PATH
4、 Restart environment variables :source ~/.bashrc
5、 Input :anaconda -V
6、 Show :anaconda Command line client (version 1.6.14)
3. PyTorch install
PyTorch One is based on Python Scientific computing package for , yes DrQA Required computing package for . Be careful !DrQA It is described on the official website :DrQA requires Linux/OSX and Python 3.5 or higher. It also requires installing PyTorch (version 0.4.0 is not supported yet), So it is recommended to install 0.4 Following PyTorch, You can visit https://pytorch.org/ Generate the installation command according to the corresponding configuration .
It's loaded with Anaconda after ,
conda install pytorch -c pytorch
ip3 install torchvision
Can be installed automatically PyTorch And dependency packages .
4. DrQA install
This part is in DrQA Of github There is a very detailed introduction on . The specific process is as follows :
(1) install DrQA And dependency packages
git clone https://github.com/facebookresearch/DrQA.git
cd DrQA
pip install -r requirements.txt
python setup.py develop
Requirements.txt Recorded DrQA Various packages on which the system depends , After executing the command, it will automatically download, install and update .
Report errors
unable to execute ‘gcc’: No such file or directory
error: Setup script exited with error: command ‘gcc’ failed with exit status 1
resolvent :sudo apt-get install python-dev
(2) install tokenizer
tokenizer There are two options , One is Stanford CoreNLP, The other is Spacy. The description on the official website is as follows :
If you use the CoreNLPTokenizer or SpacyTokenizer you also need to download the Stanford CoreNLP jars and spaCy enmodel, respectively. If you use Stanford CoreNLP, have the jars in your java CLASSPATH environment variable, or set the path programmatically with:
import drqa.tokenizers
drqa.tokenizers.set_default(‘corenlp_classpath’,’/your/corenlp/classpath/*’)
DrQA default tokenizer by CoreNlp, stay DrQA Under the folder, you can run commands ./install_corenlp.sh Download and install .
After installation, you can choose to add it to the environment variable automatically , But sometimes DrQA Adding to environment variables automatically is incorrect , It is recommended that you add it manually according to the official website . Use... If necessary spacy Can run commands python -m spacy download en.
(3) Download datasets , Word vectors, etc
Run the command to automatically download data sets and word vectors bash ./download.sh There is a large amount of downloads , about 7.5G.
thus DrQA installation is complete , function python scripts/pipeline/interactive.py To try DrQA Of demo.
Reference link :
DrQA Official website
DrQA Installation manual
边栏推荐
- JVM基础
- Echart histogram: echart implements stacked histogram
- 不在以下合法域名列表中,微信小程序解决办法
- Free screen recording software captura download and installation
- [spark]spark introductory practical series_ 8_ Spark_ Mllib (upper)__ Introduction to machine learning and sparkmllib
- Download and installation of universal player potplayer, live stream m3u8 import
- Leetcode- student attendance record i- simple
- Lamda expression
- HBuilderX:HBuilderX安装以及其常用插件安装
- php 分布式事务 原理详解
猜你喜欢

Echart柱状图:堆叠柱状图value格式化显示

The difference between the increment and decrement operators before and after variables i+, +i, I –, – I

Sqlplus connection failure
![[DP 01 backpack]](/img/be/1e5295684ead652eebfb72ab0be47a.jpg)
[DP 01 backpack]

Software testing - Summary of common interface problems

php 分布式事务 原理详解

超有范的 logo 在线设计制作工具

Echart histogram: stacked histogram displays value

JS to realize bidirectional data binding

Solution: vscode open file will always overwrite the last opened label
随机推荐
Wechat applet custom tabbar (session customer service) vant
Adding classes dynamically in uni app
Rk3399 hid gadget configuration
Wechat applet uploads pictures (preview deletion limits the size and number of pictures)
自定义View
pthon 执行 pip 指令报错 You should consider upgrading via ...
Leetcode- longest continuous increasing sequence - simple
DLL bit by bit
347. top k high frequency elements heap sort + bucket sort +map
The technical analysis of ERP systems of the two camps in the world has been picked up many times.
Intelligent digital asset management helps enterprises win the post epidemic Era
Leetcode longest harmonic subsequence simple
[turn] explain awk (2)_ Combining formatted output with built-in variables to realize requirements
Data conversion analysis tool
[DP 01 backpack]
Custom view - extensible collapsexpendview
本地文件秒搜工具 Everything
二分查找
[compilation and assembly link] coff file and structure description
Swift property property