Hide keyboard shortcuts

Hot-keys on this page

r m x p   toggle line displays

j k   next/prev highlighted chunk

0   (zero) top of page

1   (one) first highlighted chunk

1# -*- coding: utf-8 -*- 

2""" 

3@file 

4@brief Defines a very small set of modules. 

5""" 

6import sys 

7 

8 

9def datascientistbase_set(): 

10 """ 

11 list of modules to add to python to get a minimal python 

12 """ 

13 from .packaged_config_0_pyquickhelper import pyquickhelper_set 

14 from ..installhelper import ModuleInstall 

15 names = pyquickhelper_set() 

16 names += [ 

17 "appdirs", 

18 "boto", 

19 "botocore", 

20 "boto3", 

21 "bz2file", 

22 "chardet", 

23 "cchardet", 

24 "cytoolz", 

25 "dask", 

26 "gensim", 

27 "idna", 

28 "joblib", 

29 "jmespath", 

30 "pythonnet", 

31 "pywin32" if sys.platform.startswith("win") else None, 

32 "pywin32-ctypes" if sys.platform.startswith("win") else None, 

33 "s3transfer", 

34 "scikit-learn", 

35 "scipy", 

36 "smart_open", 

37 "statsmodels", 

38 "threadpoolctl", 

39 "toolz", 

40 ] 

41 from .automate_install import find_module_install 

42 names = [find_module_install(_) for _ in names if _ is not None] 

43 

44 check_is = ["smart_open", "cycler", "olefile", 

45 "toolz", "s3transfer", "jmespath", "botocore"] 

46 names_ = set(_.name if isinstance(_, ModuleInstall) else _ for _ in names) 

47 for check in check_is: 

48 if check not in names_: 

49 raise ImportError("Unable to find module '{0}' in\n{1}".format( 

50 check, "\n".join(sorted(names_)))) 

51 return names