Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

在import时出现问题:cannot import name '_get_n_jobs' #6

Closed
yangtang-cn opened this issue May 18, 2020 · 2 comments
Closed

在import时出现问题:cannot import name '_get_n_jobs' #6

yangtang-cn opened this issue May 18, 2020 · 2 comments

Comments

@yangtang-cn
Copy link

ImportError                               Traceback (most recent call last)
<ipython-input-11-bb77d769d63d> in <module>
     15 from bs4 import BeautifulSoup
     16 from nltk.stem import WordNetLemmatizer
---> 17 from nlg_yongzhuo import *

~/anaconda3/envs/python36/lib/python3.6/site-packages/nlg_yongzhuo/__init__.py in <module>
     15 from nlg_yongzhuo.text_summarization.extractive_sum.nous_base.lead_3.lead_3 import Lead3Sum
     16 
---> 17 from nlg_yongzhuo.text_summarization.extractive_sum.topic_base.topic_lda import LDASum
     18 from nlg_yongzhuo.text_summarization.extractive_sum.topic_base.topic_lsi import LSISum
     19 from nlg_yongzhuo.text_summarization.extractive_sum.topic_base.topic_nmf import NMFSum

~/anaconda3/envs/python36/lib/python3.6/site-packages/nlg_yongzhuo/text_summarization/extractive_sum/topic_base/topic_lda.py in <module>
     13 # sklearn
     14 from sklearn.feature_extraction.text import CountVectorizer
---> 15 from sklearn.decomposition import LatentDirichletAllocation
     16 import numpy as np
     17 

~/anaconda3/envs/python36/lib/python3.6/site-packages/sklearn/decomposition/__init__.py in <module>
      9 from .incremental_pca import IncrementalPCA
     10 from .kernel_pca import KernelPCA
---> 11 from .sparse_pca import SparsePCA, MiniBatchSparsePCA
     12 from .truncated_svd import TruncatedSVD
     13 from .fastica_ import FastICA, fastica

~/anaconda3/envs/python36/lib/python3.6/site-packages/sklearn/decomposition/sparse_pca.py in <module>
     11 from ..linear_model import ridge_regression
     12 from ..base import BaseEstimator, TransformerMixin
---> 13 from .dict_learning import dict_learning, dict_learning_online
     14 
     15 

~/anaconda3/envs/python36/lib/python3.6/site-packages/sklearn/decomposition/dict_learning.py in <module>
     18 from ..externals.joblib import Parallel, delayed, cpu_count
     19 from ..externals.six.moves import zip
---> 20 from ..utils import (check_array, check_random_state, gen_even_slices,
     21                      gen_batches, _get_n_jobs)
     22 from ..utils.extmath import randomized_svd, row_norms

ImportError: cannot import name '_get_n_jobs'

@yongzhuo
Copy link
Owner

yongzhuo commented May 18, 2020

可以说下你安装的是nlg_yongzhuo的哪个版本,以及windows/linux环境,python版本等信息么。
有一点点像这个错误:scikit-learn/scikit-learn#11656

@yangtang-cn
Copy link
Author

@yongzhuo 谢谢提醒,机器重启后问题就没出现了。nlg安装的是0.0.4版本,ubuntu18,python3.6。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants