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

执行时提示缺少模块,我能不能在程序打包的时候,把提示少的模块目录放到程序所在目录,一块打包。 #92

Open
leafage-autumn opened this issue Jan 7, 2019 · 1 comment

Comments

@leafage-autumn
Copy link

我这样试了,然后不提示缺模块了,但是其他错误。想请教下这种方式不行吗。必须手动到集群下所有机器中手动安装模块吗。日志如下:

Traceback (most recent call last):
File "Logistic_regression_demo_03.py", line 13, in
from sklearn import datasets
File "/usr/local/hadoop/tmp/nm-local-dir/usercache/root/appcache/application_1543824764893_0001/container_1543824764893_0001_01_000002/sklearn/init.py", line 63, in
from . import __check_build
File "/usr/local/hadoop/tmp/nm-local-dir/usercache/root/appcache/application_1543824764893_0001/container_1543824764893_0001_01_000002/sklearn/__check_build/init.py", line 46, in
raise_build_error(e)
File "/usr/local/hadoop/tmp/nm-local-dir/usercache/root/appcache/application_1543824764893_0001/container_1543824764893_0001_01_000002/sklearn/__check_build/init.py", line 41, in raise_build_error
%s""" % (e, local_dir, ''.join(dir_content).strip(), msg))
ImportError: No module named _check_build

Contents of /usr/local/hadoop/tmp/nm-local-dir/usercache/root/appcache/application_1543824764893_0001/container_1543824764893_0001_01_000002/sklearn/__check_build:
init.py pycache _check_build.cp36-win_amd64.pyd
setup.py init.pyc

It seems that scikit-learn has not been built correctly.

If you have installed scikit-learn from source, please do not forget
to build the package before using it: run python setup.py install or
make in the source directory.

If you have used an installer, please check that it is suited for your
Python version, your operating system and your platform.
mv: cannot stat 'B6ED14D4-A27C-476E-B10D-B9A07A8D6612': No such file or directory
mv: cannot stat '98A50D03-28DF-48F1-91D6-E788D587714C': No such file or directory

谢谢,请帮忙解答下

@sinllychen
Copy link
Contributor

@leafage-autumn 上面那个代码你只是Import了sklearn的包。但是实际上docker容器中的python环境默认没有安装这个包。所以还是需要到各个节点中手动安装下sklearn

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