baidu / baidu/information-extraction

该代码是Python2还是Python3??为什么我两个都用了还是在报错?

Open
#19 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
330
Forks
93
PR merge metrics
No merged PRs in 30d

Description

```Python
(env) [root@localhost information-extraction]# python bin/p_classification/p_train.py --conf_path=./conf/IE_extraction.conf
Traceback (most recent call last):
File "bin/p_classification/p_train.py", line 28, in
import paddle
File "/mnt/information-extraction/env/lib64/python2.7/site-packages/paddle/__init__.py", line 25, in
import paddle.dataset
File "/mnt/information-extraction/env/lib64/python2.7/site-packages/paddle/dataset/__init__.py", line 25, in
import paddle.dataset.sentiment
File "/mnt/information-extraction/env/lib64/python2.7/site-packages/paddle/dataset/sentiment.py", line 29, in
import nltk
File "/mnt/information-extraction/env/lib/python2.7/site-packages/nltk/__init__.py", line 128, in
from nltk.collocations import *
File "/mnt/information-extraction/env/lib/python2.7/site-packages/nltk/collocations.py", line 35, in
from nltk.probability import FreqDist
File "/mnt/information-extraction/env/lib/python2.7/site-packages/nltk/probability.py", line 333
print("%*s" % (width, samples[i]), end=" ")
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the reported command, `python bin/p_classification/p_train.py --conf_path=./conf/IE_extraction.conf`, in the shown environment and inspect the Python 2.7 installation of Paddle and NLTK. Compare the interpreter and dependency versions involved; the issue is done when the supported environment and the cause of the import failure are clearly established.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.